Skip to content

Add label rules for contribution agreements and triage management#2158

Merged
riaankleinhans merged 1 commit into
mainfrom
update-label-rules
May 13, 2026
Merged

Add label rules for contribution agreements and triage management#2158
riaankleinhans merged 1 commit into
mainfrom
update-label-rules

Conversation

@riaankleinhans
Copy link
Copy Markdown
Contributor

Auto-labeler improvements: mutual exclusivity & needs-* cleanup

Problem

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 corresponding needs-* label would persist indefinitely. The same issue existed for dd/needs-triage.

Additionally, some mutually exclusive label groups had no enforcement — contribution-agreement/signed and contribution-agreement/unsigned could coexist, and level/* 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 — removes needs-triage when any triage/* label is present
  • remove-needs-kind — removes needs-kind when any kind/* label is present
  • remove-needs-group — removes needs-group when any toc, tag/*, or sub/* label is present
  • remove-dd-needs-triage — removes dd/needs-triage when any dd/triage/* label is present

Added mutual exclusivity enforcement for label groups that lacked it:

  • contribution-agreement-signed / contribution-agreement-unsigned — applying either one removes the other
  • apply-level — new /level <value> command that removes all other level/* labels before applying the new one

README_Labelling.md

  • Added /level <value> to the slash commands reference
  • Expanded the "Automatic Labeling" section with three structured subsections: needs-* helper label behaviour, mutually exclusive label groups, and file path rules

Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Riaan Kleinhans <riaankleinhans@gmail.com>
@riaankleinhans riaankleinhans requested review from a team as code owners May 13, 2026 11:04
@github-actions github-actions Bot added needs-triage Indicates an issue or PR that has not been triaged yet (has a 'triage/foo' label applied) needs-kind Indicates an issue or PR that is missing an issue type or kind (a kind/foo label) labels May 13, 2026
@github-actions github-actions Bot added the needs-group Indicates an issue or PR that has not been assigned a group (toc or tag/foo label applied) label May 13, 2026
@riaankleinhans riaankleinhans added kind/enhancement General items related to enhancements or improvements. toc toc specific issue triage/valid Issue or PR is valid with enough information to be actionable labels May 13, 2026
@riaankleinhans riaankleinhans merged commit e14a8f6 into main May 13, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from New to Done in CNCF TOC Board May 13, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement General items related to enhancements or improvements. needs-group Indicates an issue or PR that has not been assigned a group (toc or tag/foo label applied) needs-kind Indicates an issue or PR that is missing an issue type or kind (a kind/foo label) needs-triage Indicates an issue or PR that has not been triaged yet (has a 'triage/foo' label applied) toc toc specific issue triage/valid Issue or PR is valid with enough information to be actionable

Projects

Status: Done
Status: No status
Status: No status
Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant