Giter VIP home page Giter VIP logo

no-free-usage-action's Introduction

NO-FREE-USAGE action

GitHub release (latest by date)

Language: English | 中文简体

A NO-FREE-USAGE action for github. (Only worked with github action.)

TL;DR

Sometimes you don't want some own the permission to file an issue on your repository, especially when you are being volunteered by this person to do a free bang job for him/her. It's wasting time if you always close them manually. So here we provide an action to detect whether the user starred or forked or both done, then close & lock the issue if they don't.

image

How to use it?

  • Create a yml file, such as checker.yml, under .github/workflow/ directory.
  • Waiting for someone to file an issue.

Simple usage

on:
  issues:
    types: [opened, reopened]

jobs:
  build:

    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v2
    - name: Check issue actor
      uses: fluttercandies/[email protected]
      with:
        token: ${{ secrets.GITHUB_TOKEN }}

Parameters list

Name Description Required Default value Supported value
token GitHub token for issue handling authorization. true *************************** ${{ secrets.GITHUB_TOKEN }}
forked Whether required user forked the repository. false -f -f / --no-forked
starred Whether required user starred the repository. false -s -s / --no-starred
event_path Event original file path for github workflow. false *************************** /github/workflow/event.json
words Reply content when closing. (Can be Markdown) false Please file the issue after you starred and forked the repo. Thanks! 🙂 Any strings

no-free-usage-action's People

Contributors

alexv525 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

no-free-usage-action's Issues

NoSuchMethodError: The method '_greaterThanFromInteger' was called on null.

Downloading term_glyph 1.1.0...
Downloading collection 1.14.13...
Downloading path 1.7.0...
Changed 13 dependencies!
Unhandled exception:
NoSuchMethodError: The method '_greaterThanFromInteger' was called on null.
Receiver: null
Tried calling: _greaterThanFromInteger(100)
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1 int.> (dart:core-patch/integers.dart:105:18)
#2 min (dart:math-patch/math_patch.dart:19:9)
#3 forksCheck.requestForked (package:no_free_action/checker.dart:66:21)
#4 forksCheck (package:no_free_action/checker.dart:85:22)
#5 check (package:no_free_action/checker.dart:27:5)

#6 main (file:///github/action_files/bin/main.dart:54:9)

#7 _startIsolate. (dart:isolate-patch/isolate_patch.dart:299:32)
#8 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)

the action is very stupid, i suggest you close this repo

if a user found some issues, and feedback to the repo's owner, is not that a good thing? Why is there a requirement for the person finding a issue? that's absurd!

if that person did not star or fork repo but sponsored the project, how about that?

i am afraid this repo shows you has not understood oss and also your narrow-mindedness.

do the right thing, close it!

Test

Before Stared.

Test

Before forked.

不起作用,脚本报错了

我的项目是非dart项目,脚本执行爆了如下的错误:

Could not find a file named "pubspec.yaml" in "/github/workspace".
Error: Error when reading 'bin/main.dart': No such file or directory

image
如果项目是dart项目,但是是flutter项目,又爆了如下错误:

Resolving dependencies...
Because flutter_xupdate requires the Flutter SDK, version solving failed.

Flutter users should run `flutter pub get` instead of `pub get`.
Error: Error when reading 'bin/main.dart': No such file or directory

image
难道项目必须是纯dart项目???

脚本编辑如下:

name: No Free usage issue checker  # Action名字。可以自定义
on:
  issues:
    types: [opened, reopened]  # 在issue打开和重新打开时调用

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Check issue actor  # 步骤名字。可以自定义。
        uses: fluttercandies/no-free-usage-action@master  # 使用最新版本的action
        with:
          token: ${{ secrets.GITHUB_TOKEN }}  # 由GitHub提供的临时Token,必须在此处进行传递,且必须为这个值。
          forked: '--no-forked'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.