This webhook utility that will automatically update Github issue labels when an issue/PR card is moved from one column of your project board to the next.
When deploying utility you need to provide several variables:
ACCESS_TOKENGitHub's personal access tokenWEBHOOK_TOKENToken used for request signingPROJECT_NAMEScomma separated list of project names, that will be affected by this utility. Note Project must be in repo. It does not work with ORG level projects. egSample Project,Another projectPORTport on which utility will listen
when deployed utility will listen at root url: http(s)://somehost.com/
If you don't have a web server to deploy the script on, use a free instance of Heroku.
When you have deployed ghLabeler you need to set up your repo to work with it.
- Create project(s) named as entries in
PROJECT_NAMESvariable on your server. - Setup columns.
- To the name of each column add
labels:tag followed by comma separated list of label's names to use when card gets into that column. eglables:New,Web,Test - To the name of each column add
users:tag followed by comma separated list of user names to assign to the card when it gets into that column. egUsers:DrMagPie,Conor,Rick - Note these list are not required. You can use only one of them.
- To the name of each column add
- setup webhook
- Content type must be set to
application/json - As the trigger select the event
Project card.
- Content type must be set to
Now everything is ready to be used. When you move an issue card in your Github Project from one column to another, the labels from the column names lables: list will be added and removed. And cards will be assigned and unassigned to the persons in users: list.
If you find any issues in the Utility, feel free to open an issue or send me a pull request.