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

Automate additions of labels when userstyles are added #141

Closed
3 of 4 tasks
sgoudham opened this issue Jul 26, 2023 · 1 comment · Fixed by #143
Closed
3 of 4 tasks

Automate additions of labels when userstyles are added #141

sgoudham opened this issue Jul 26, 2023 · 1 comment · Fixed by #143
Assignees
Labels
meta Repository-wide issues

Comments

@sgoudham
Copy link
Contributor

sgoudham commented Jul 26, 2023

Is there an existing issue outlining your problem?

  • I have searched the existing issues and they do not solve my problem.

Describe your issue.

At the time of writing, maintainers have to manually create labels for any new additions into this repository. This is an extra manual step that can be easily forgotten by any maintainer.

The Issue Labeler and Pull Request Labeler rely on labels that match the directories under /styles/, therefore, this should be automated.

Proposal

While we could go down the REST/GraphQL API approach, I believe this will be more painful as there doesn't seem to be a nice API call which can set all the labels for a repository at once.

I believe we should leverage existing solutions built by the community, two of which are listed below:

Acceptance Criteria

  • Leverage an existing GitHub Action to sync labels
    • Auto-generate YAML file containing label definitions from each directory under /styles/
    • The color field should be taken from the userstyles.yaml configuration.
      • If a userstyle has the color field set, the accent color should be taken from the macchiato palette.
      • If a userstyle does not have the color field set, we should default it to the text label. Or we could be fancy and somehow hash the name of the userstyle and generate a hex code based on that.
@sgoudham sgoudham added the meta Repository-wide issues label Jul 26, 2023
@sgoudham sgoudham self-assigned this Jul 26, 2023
@sgoudham
Copy link
Contributor Author

sgoudham commented Aug 9, 2023

Upon further discussion, we've decided to hard code the label colour to macchiato blue.

This keeps the code simple and avoids bringing in the catppuccin palette for giving labels unique colours. Additionally, it prevents us from over-engineering the solution to this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Repository-wide issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant