Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mechanism for managing a consistent set of label across repos, with local overrides #47

Open
salewski opened this issue Sep 15, 2020 · 0 comments
Labels
type:feature Adds a new capability or behavioral property

Comments

@salewski
Copy link
Owner

This would work mainly with the GitHub "Labels" API:

A "label" is comprised of a name, a (background) color, and a description.

When displayed in the GitHub webapp UI, the name is printed in either black or white on top of a button-sized area whose background is filled with the label's configured color. Whether the text appears in black or white cannot directly be controlled, but is probably decided based on the L value in the HSL (as in the Farbtastic Color Picker):

    // ...
      $(fb.callback).css({
        backgroundColor: fb.color,
        color: fb.hsl[2] > 0.5 ? '#000' : '#fff'
      });
    // ...

Use cases:

  • Setting up a repository: apply a canned set of labels
  • Add some new label definition to "all my repos" (with exceptions)
  • Diff current set of labels on a repo against a canned config
  • Generate labels config from documentation, or vice versa (something simple, though)
    The idea that there is a single source of truth, and it is documented.
    Any file format used should be diff-friendly so that it can easily be seen whether differences exist specifically in the names, colors, descriptions, or some combination.
  • Change definition of an existing label (color or description) to match a given spec
  • Add canned label Foo to all issues and/or PRs in a repo currently tagged with label Bar
@salewski salewski added type:feature Adds a new capability or behavioral property and removed new feature labels Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature Adds a new capability or behavioral property
Projects
None yet
Development

No branches or pull requests

1 participant