This is a labels.json file to be used with the github-labels tool (node). The github-labels tool creates labels on a github repository by using a json file defining the label names and colors.
This is Caxy's default labels that faciliate the Caxy code review process.
Install github-labels globally if you don't have it
$ yarn global add github-labels
Download the labels.json from this gist to your machine if you don't have it:
$ wget -O ~/labels.json https://gist.githubusercontent.com/jschroed91/1a18cd468626ed250b25e9f2cbb51f02/raw/labels.json
- Grab a copy of the shell script and save it locally
wget -O ~/github_labels.sh https://gist.githubusercontent.com/jschroed91/1a18cd468626ed250b25e9f2cbb51f02/raw/github_labels.sh
-
Generate personal access token (be sure to copy it): https://github.com/settings/tokens/new?scopes=repo&description=github-labels
-
Edit the
~/github_labels.sh
script and paste your personal access token in there to set the TOKEN variable. Save the file.
# ...
TOKEN=your-token-here
# ...
- Run the command to clear out a repo's labels and add the caxy standard labels
$ sh ~/github_labels.sh caxy/repository-name
- Generate personal access token: https://github.com/settings/tokens/new?scopes=repo&description=github-labels
- Copy the access token
- Run the labels command using the
-t
option like below (replacing PERSONAL_ACCESS_TOKEN with your token):
$ labels -c labels.json -t PERSONAL_ACCESS_TOKEN caxy/name-of-repository
You'll need to use the token anytime you want to run that command - so you can either save a copy of the token somewhere to re-use later, or you can always regenerate a personal access token on github.
By default, the command adds the labels to the already existing labels. Sometimes you want to wipe out existing labels and add only these (for example when setting up a new repo).
Overwrite the existing labels by using the force option (-f
, --force
):
$ labels -f -c labels.json -t PERSONAL_ACCESS_TOKEN caxy/name-of-repository