GitHub: unique label namespaces

Since you can't be 'priority: low' and 'priority: high' at the same time, this will automatically tidy up clashes.
Readme:

Every time someone adds a label to an issue or pull request, this sketch will scan through the PREFIXES config variable and remove any other labels beginning with the same prefix as the added label.

For example,

  1. set PREFIXES: ['type:', 'status:', 'priority:']
  2. set issue 7 labels to type: bug and priority: low
  3. add tag priority: high to issue 7
  4. this sketch will automatically remove the priority: low tag

Common prefixes you may wish to use:

  • pri: / priority: - how high (business) priority is this issue?
    • pri:low
    • pri:medium
    • pri:high
  • src: / source: - where did the issue come from?
    • src:rollbar
    • src:user-testing
    • src:suggestion
  • sev: / severity: - how severe is the issue?
    • sev:blocker
    • sev:critical
    • sev:major
    • sev:minor
  • status: - what stage is this issue at?
    • status:blocked
    • status:in-progress
    • status:needs-review
    • status:qa