Skip to content

GitHubToolbox/github-label-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHubToolbox logo
Github Build Status License Created
Release Released Commits since release

Overview

This script is designed to allow you to manage the labels on your GitHub repositories. Labels are used to categorize issues, pull requests, and discussions.

Keeping all your labels consistent makes it easier to work across multiple repositories (and organisations)

We currently manage over 100 repositories across more than 15 organisations so it is important to reduce any friction when moving between project to deal with issues pr pull requests.

To get you started we have also included a copy of the config that we use for all of the repositories we manage, you can find that in the config directory. In there you will find a copy of the labels in both JSON and YAML format.

Command Line Usage

usage: github-label-manager [-h] [-d] [-v] [-j | -y] [-t TOKEN] -f FILENAME [-u USER | -o ORG | -r REPO]

Setup labels on git repository.

flags:
  -h, --help            show this help message and exit.
  -d, --dry-run         Perform a dry run (default: False)
  -v, --validate        Validate local labels (default: False)

mutually exclusive flags:
  -j, --json            JSON formatted config file (default: True)
  -y, --yaml            YAML formatted config file (default: False)

selective:
  -t TOKEN, --token TOKEN
                        GitHub token (needed for everything except -v/--validate) (default: None)

required:
  -f FILENAME, --filename FILENAME
                        File containing labels (default: None)

mutually exclusive:
  -u USER, --user USER  Specify username (default: None)
  -o ORG, --org ORG     Specify organization (default: None)
  -r REPO, --repo REPO  Specify repository (default: None)

Examples

Validate the labels config file

$ github-label-manager -f config/labels.json -v

Update a specific repository

$ github-label-manager -f config/labels.json -t <PAT> -r <Repository>

Repository is in the format of organization/repo_full_name E.g. GitHubToolbox/github-label-manager

Update all repositories for a given organization

$ github-label-manager -f config/labels.json -t <PAT> -o <Organisation>

Update all repositories for a given user

$ github-label-manager -f config/labels.json -t <PAT> -u <username>

Dry Runs

You can add a -d/--dry-run to any of the 3 examples above and it will show you the changes it would make.

Personal Access Tokens (PAT)

You will need to create a PAT with enough permissions to be able to update the repository labels.


About

A tool for managing GitHub labels.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages