Giter VIP home page Giter VIP logo

labels-manager's Introduction

GitHub Repo Labels Manager

Unifies labels across multiple GitHub repos. Initializes new repo labels.

How it works?

  • Based on a list of repos that needs to be unified in terms of labels and a set of rules, these labels are unified. Run
node main.js --token=<your-token-here>
  • Initializes brand new repo labels by deleting the default ones and adding lables specified by the rules Run
node init.js --token=<your-token-here> --repo=<org-or-user/repo-name here>

i.e.

node init.js --token=<your-token-here> --repo=radeva/test-labels

Configuration

In config.ts:

  • Replace <token-here> with a github token of a user having access to all repos you want to unify. If you don't want to do it in the code, just pass your-token as a parameter
  • Set isDryRun to true only if you want to check what will be changed without any changes applied to GitHub. It's false by default
  • Create labelRules array with the rules to which the labels need to comply to. Example rule configuration:
{ 
    from: ['s:critical', 's: critical', 'critical', 'severity: critical'], 
    to: { name: 'severity: critical', color: 'b60205', required: true }
}

This means that if there is a label with name equal case-insenstive to any of the names specified in from, its name will be updated to to.name and its color will be updated to b60205. If required is true and the label doesn't exist in the list after all the updates, it will be added.

  • In repos array specfy the repos that need to be unified along with the user/organisation to which they belong to. For example: NativeScript/nativescript-facebook

Execution

  • In Terminal / Command Prompt run tsc to transpile TypeScript to JavaScript
  • Then to update labels across multiple repos according to the specified rules run
node main.js --token=<your-token-here>
  • OR to init a brand new repo labels run
node init.js --token=<your-token-here> --repo=<org-or-user/repo-name here>

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.