Add label rules for contribution agreements and triage management#2158
Merged
Conversation
Co-authored-by: Copilot <copilot@github.com> Signed-off-by: Riaan Kleinhans <riaankleinhans@gmail.com>
riaankleinhans
added a commit
to cncf/automation
that referenced
this pull request
May 13, 2026
Port the same improvements from cncf/toc#2158 and cncf/toc#2159. labels.yaml: - Add remove-needs-triage/kind/group/priority/area/status mirror rules so needs-* helper labels are removed automatically whenever the corresponding real label is applied (regardless of how it was applied) - Add remove-dd-needs-triage: removes dd/needs-triage when any dd/triage/* label is present - Add apply-level: new /level <value> command that removes all other level/* labels before applying the chosen one (mutual exclusivity) detect-label-drift.yml: - Add pull-requests: write permission - Add 'Fix stale helper labels on open issues and PRs' step that retrospectively cleans up stale needs-* labels on all open issues and PRs README_LABELING.md: - Document /level <value> slash command - Expand Auto-Labeling section with needs-* removal table and mutually exclusive label groups subsections Signed-off-by: Riaan Kleinhans <riaankleinhans@gmail.com>
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.
Auto-labeler improvements: mutual exclusivity &
needs-*cleanupProblem
The auto-labeler could only add
needs-*helper labels but never removed them automatically. If a group, kind, or triage label was applied manually via the GitHub UI (rather than via a/command), the correspondingneeds-*label would persist indefinitely. The same issue existed fordd/needs-triage.Additionally, some mutually exclusive label groups had no enforcement —
contribution-agreement/signedandcontribution-agreement/unsignedcould coexist, andlevel/*had no apply command to enforce single-value selection.Changes
labels.yaml
Added mirror rules for all
needs-*helper labels so they are removed automatically whenever the corresponding label is present, regardless of how that label was applied:remove-needs-triage— removesneeds-triagewhen anytriage/*label is presentremove-needs-kind— removesneeds-kindwhen anykind/*label is presentremove-needs-group— removesneeds-groupwhen anytoc,tag/*, orsub/*label is presentremove-dd-needs-triage— removesdd/needs-triagewhen anydd/triage/*label is presentAdded mutual exclusivity enforcement for label groups that lacked it:
contribution-agreement-signed/contribution-agreement-unsigned— applying either one removes the otherapply-level— new/level <value>command that removes all otherlevel/*labels before applying the new oneREADME_Labelling.md
/level <value>to the slash commands referenceneeds-*helper label behaviour, mutually exclusive label groups, and file path rules