Repository navigation
chore: area labels as code, auto-labeling and current issue forms - #321
Merged
Merged
Conversation
.github/labels.yml declares every label and Label Sync makes the repo match it, failing first when a labeler config or issue form uses an undeclared label. actions/labeler labels PRs by path and github/issue-labeler labels issues by their Component answer. Both issue forms share one Component list that maps to the area labels, the chooser and a new SECURITY.md point to private vulnerability reporting, and the PR template has the generated API step.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The repo had only GitHub's default labels and Dependabot's, nothing for subsystems, and the two issue forms offered different Component lists that matched nothing. I've created eight
area:labels plussecurityand put them on all open issues. This PR makes them stick.Labels are code now.
.github/labels.ymllists every label in the repo, generated from the live set, so the first sync changes nothing. Label Sync runscrazy-max/ghaction-github-labeleron main, on Mondays and by hand, and makes the repo match the file. That includes deleting a label the file doesn't list, which takes it off every issue, so new labels go in the file, not the UI. On a PR it only prints what it would change. Before the sync, ayqstep fails the run when the PR path rules, the issue rules or an issue form use a label the file doesn't declare. That cross-check is the only hand-written part, since no action covers it.Labels get applied by stock actions. On PRs,
actions/labelermaps changed paths to areas through.github/labeler.yml. It runs onpull_request_target, so fork PRs get labeled too, and it never checks out PR code. On issues,github/issue-labelermaps the Component answer to an area through.github/issue-labeler.yml. It never removes labels, so ones added by hand stay. Both forms now share one Component list that maps one to one onto the areas, plus "Not sure".Smaller fixes: the bug form asks for a version and the script's language instead of "Python version: 3.12", the issue chooser and a new SECURITY.md point to private vulnerability reporting (already enabled, but nothing linked to it), and the PR template has the generated API step. CONTRIBUTING and the CI/CD doc describe all of it.
Checked: the label check passes as written and fails on a typo in the path rules and in a form; each dropdown option hits exactly one issue rule through JS RegExp; a dry run of the path rules against #312, #315, #316, #319 and #320 gives sensible areas;
mkdocs build --strictpasses. This PR's Label Sync run is the live dry run.Summary by cubic
The repo only had GitHub's default and Dependabot labels, so I added eight
area:labels plussecurity, applied them to all open issues, and made them stick.Labels now live as code in
.github/labels.yml, and the new Label Sync workflow makes the repo match that file — including deleting labels the file doesn't list, so new labels are added there, not the GitHub UI. PRs getarea:labels from changed paths; issues get them from the Component answer in the issue forms. Both forms now share one Component list that maps one to one onto the areas, plus "Not sure".SECURITY.mdpoint to private vulnerability reporting, and the PR template includes the generated API step.Written for commit 19bf871. Summary will update on new commits.