Giter Club home page Giter Club logo

github-label-manager's Introduction

Github-label-manager

This application is designed to manage the labels in your github repository from a source of truth repository.

A good usecase for this is if you want a standardised all your labels across a given repository topic, of cookbook, label definitions are collected from json files inside the source of truth repository

User Permissions

  • It is recommended to use a github bot account when using this application
  • You must ensure the account has permissions to create branches and pull requests directly on the repository, it will not try to fork.
  • You must also supply a GITHUB_TOKEN to access the github api server with.

Items of Note

Github has a rate limiter, do not run this script continously you will get rate limited and then the script will fail

Configuration

Below are a list of variables, what they mean and example values

Name Type Required Description
GITHUB_TOKEN String Yes Token to access the github api with, see Creating a token
GITHUB_API_ROOT String No Where the api root is for github, defaults to api.github.com (Useful for enterprise users)
GLM_SOURCE_REPO_OWNER String Yes The Owner of the repository which holds the desired label definitions
GLM_SOURCE_REPO_NAME String Yes The name of the repository which holds the desired label definitions
GLM_SOURCE_REPO_PATH String Yes The folder inside the Source Repo to find the definitions you wish to have applied
GLM_DESTINATION_REPO_OWNER String Yes The owner of the destination repositories you wish to update
GLM_DESTINATION_REPO_TOPICS String Yes The topics that the destination repositories are tagged with to search for, Takes a csv, eg: chef-cookbook,vscode
GLM_DELETE_MODE Boolean Yes Delete all non-matching labels inside the repository, set to 0 to skip, set to 1 to delete

Label declaration

Each label must be declared inside a seperate file in the source repository/path combo.

Example file

name: help-wanted.json

{
  "name": "help wanted",
  "color": "#008672",
  "description": "Extra attention is needed"
}

Examples for all the default label declarations can be found inside label-definitions in this repository

Docker Tags

This application is tagged as follows

Name Description
latest The latest master merge
dev The latest Pull Request build
semvar (eg: 1.0.0) A Github Release of a fixed point in time

While all updates should result in a release this is not always the case, sometimes master will change for non-functional related changes and a release will not be made, eg a new file in the infrastructure folder

github-label-manager's People

Contributors

xorima avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.