ghlabeler

command module
v0.0.0-...-774325d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

README

ghLabeler

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.

Deploying

When deploying utility you need to provide several variables:

  • ACCESS_TOKEN GitHub's personal access token
  • WEBHOOK_TOKEN Token used for request signing
  • PROJECT_NAMES comma 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. eg Sample Project,Another project
  • PORT port 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.

Configuring

When you have deployed ghLabeler you need to set up your repo to work with it.

  1. Create project(s) named as entries in PROJECT_NAMES variable on your server.
  2. 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. eg lables: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. eg Users:DrMagPie,Conor,Rick
    • Note these list are not required. You can use only one of them.
  3. setup webhook
    • Content type must be set to application/json
    • As the trigger select the event Project card.

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.

Feedback

If you find any issues in the Utility, feel free to open an issue or send me a pull request.

Documentation

Overview

Copyright © 2020 DrMagPie

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL