A Github Action that helps you to add and remove labels of all PRs in a given repo.
github-token
: Mandatory, Github API TOKEN. More info
repository-name
: Mandatory, string, the repository where the action is ran. eg: Typeform/labeler
label_action
: Mandatory, option between add or remove
label
: Mandatory, how you want to name your label
base-branch
: Optional, filter pulls by base branch name. Default: all base branches
hard-failure
: Optional, boolean, if true, fails the build on any error. If false, throws an warning instead. Default is false.
All code should pass tests, as well as be well documented. Please also see the Commit Message Guidelines for how commit messages should be structured.
- Node.js
- Yarn
To install the project dependencies:
yarn
Copy the contents of the .env.dist
file into a new file called .env
and fill in the necessary variables with your own variables.
yarn start
yarn test
Github actions requires all the package dependencies in the repo to run the JavaScript code.
We prefer to distribute our code and modules into a single file: dist/index.js
. To do that, run:
yarn distribute