Skip to content

Replace automatic milestone assignment with status/triage - #1812

Merged
jjbustamante merged 10 commits into
mainfrom
chore/skip-asign-milestone-when-already-set
Nov 25, 2026
Merged

jjbustamante merged 10 commits into
mainfrom
chore/skip-asign-milestone-when-already-set

Conversation

@jjbustamante

@jjbustamante jjbustamante commented Jun 26, 2023 •

Copy link
Copy Markdown
Member

Summary

New contributions were sorted into a release automatically and were not flagged for triage. This swaps that around: nothing gets a milestone on its own, and everything arrives labelled status/triage so there is one batch to work through when deciding which release it belongs to.

Stop auto-assigning a milestone. The add-milestone job ran on every pull_request_target activity, including synchronize. Pushing a commit to a pull request reset a milestone I had changed by hand, so merging main into an older pull request was enough to lose it. It also picked the milestone with sort: due_on and data[0], but that call returns milestones with no due date too, so with none set anywhere the oldest open milestone always won regardless of which release was in progress. That is how 0.41.0 came to hold 69 open items, and once it closed new pull requests would have started landing in the 0.40.12 patch milestone. The job is removed rather than guarded: which release a change belongs to is a triage decision.

For the record, the guard this branch originally added would not have helped either. It read result.milestone from issues.get, which returns {data: {...}}, so the value was always undefined and the job fell through to the update. That is why it looked untestable back then; it behaved exactly like no change at all.

Label new issues and pull requests status/triage. The templates apply it already, but three paths bypass them: a blank issue, anything opened through the API or gh, and every pull request. #2695, #2707, #2726, #2729, #2754, #2756, #2758, #2760 and #2761 all arrived with no labels at all. Anything that already carries a status/ label is left alone, so the issues the bots file for CVEs and Go upgrades keep the status/ready or status/in-progress they set themselves.

Require an issue template. Blank issues were enabled, which is the default, and that is the path those unlabelled issues came in through — their bodies follow none of the templates. Every issue now goes through Bug, Chore or Feature request and arrives with both a type/ and a status/ label. The Questions contact link to the community discussions is unaffected.

Output

Before

$ gh issue list --limit 5 --json number,author,labels
2761  BahaaMattar  []          # blank issue, no labels, labelled by hand six days later
2760  BahaaMattar  []
2758  BahaaMattar  []
2753  sermler      [type/enhancement, status/requires-rfc]
2752  github-actions [type/bug, status/ready, go1.27.4]

$ gh pr view <any new PR> --json milestone,labels
milestone: 0.41.0        # guessed, and reset on every push
labels:    [type/chore]  # never flagged for triage

After

$ gh pr view <any new PR> --json milestone,labels
milestone: null
labels:    [type/chore, status/triage]

$ gh issue list --label status/triage    # the batch to triage

Documentation

  • Should this change be documented?
    • Yes, see #___
    • No

Maintainer-facing. I'll let the other maintainers know that new work no longer gets a milestone automatically and that status/triage is where to find the batch.

Related

No issue; found while triaging the open pull requests for 0.41.0.

@github-actions github-actions Bot added the type/chore Issue that requests non-user facing changes. label Jun 26, 2023
@github-actions github-actions Bot added this to the 0.30.0 milestone Jun 26, 2023
@jjbustamante jjbustamante modified the milestones: 0.30.0, 0.31.0 Jun 26, 2023
@jjbustamante
jjbustamante force-pushed the chore/skip-asign-milestone-when-already-set branch from 1945f86 to de7a86d Compare June 26, 2023 22:36
@github-actions github-actions Bot modified the milestones: 0.31.0, 0.30.0 Jun 26, 2023
@jjbustamante jjbustamante modified the milestones: 0.30.0, 0.30.1 Jun 30, 2023
@jjbustamante jjbustamante removed this from the 0.30.1 milestone Sep 12, 2023
@jjbustamante jjbustamante modified the milestones: 0.32.0, 0.33.0 Oct 31, 2023
@jjbustamante jjbustamante removed this from the 0.33.0 milestone Nov 22, 2023
@jjbustamante

Copy link
Copy Markdown
Member Author

PR is still on draft, removing the milestone

Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
… one

Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
@jjbustamante
jjbustamante force-pushed the chore/skip-asign-milestone-when-already-set branch from de7a86d to d163a95 Compare February 7, 2024 23:09
@github-actions github-actions Bot added this to the 0.34.0 milestone Feb 7, 2024
@jjbustamante jjbustamante modified the milestones: 0.34.0, 0.35.0 Mar 8, 2024
@github-actions github-actions Bot modified the milestones: 0.35.0, 0.34.0 Apr 19, 2024
@jjbustamante jjbustamante modified the milestones: 0.34.0, 0.35.0 Apr 19, 2024
@natalieparellano

Copy link
Copy Markdown
Member

@jjbustamante do you remember what was left for this one?

@natalieparellano natalieparellano modified the milestones: 0.35.0, 0.36.0 Jul 9, 2024
@jjbustamante

Copy link
Copy Markdown
Member Author

@jjbustamante do you remember what was left for this one?

Testing it! 😄

I think I didn't find the way to actually test the PR

@jjbustamante jjbustamante modified the milestones: 0.36.0, 0.37.0 Nov 13, 2024
@jjbustamante jjbustamante removed this from the 0.37.0 milestone Feb 21, 2025
jjbustamante and others added 2 commits November 25, 2026 08:05
The add-milestone job ran on every pull_request_target activity, including
'synchronize', and called issues.update unconditionally. Pushing a commit to
a pull request therefore reset a milestone a maintainer had changed by hand,
silently undoing release planning.

Three things were wrong:

- The job ran on 'synchronize'. It now runs only on 'opened' and 'reopened',
  so a later push can no longer reassign anything. The label job keeps running
  on every push, where relabelling is still wanted.
- The guard added earlier read `result.milestone` from issues.get, which
  returns `{data: {...}}`. It was always undefined, so the guard never fired.
  It now reads `result.data.milestone`.
- The milestone was picked with `sort: due_on` and `data[0]`. Milestones
  without a due date are returned by that call too, so with no due dates set
  anywhere the oldest open milestone always won, regardless of which release
  was actually in progress. The job now considers only milestones that have a
  due date, picks the nearest one, and assigns nothing when none has one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Juan Bustamante <bustamantejj@gmail.com>
@github-actions github-actions Bot added this to the 0.41.0 milestone Nov 25, 2026
@jjbustamante
jjbustamante marked this pull request as ready for review November 25, 2026 13:07
@jjbustamante
jjbustamante requested review from a team as code owners November 25, 2026 13:07
The add-milestone job assigned a milestone on every pull_request_target
activity, including 'synchronize'. Pushing a commit to a pull request reset a
milestone that had been changed by hand, so merging main into an older pull
request was enough to lose its milestone and silently undo release planning.

The job is removed rather than guarded. Which release a change belongs to is a
triage decision, and no heuristic available to the workflow makes it well:
the milestone was picked with 'sort: due_on' and 'data[0]', but that call also
returns milestones with no due date, so with none set anywhere the oldest open
milestone always won regardless of which release was in progress. That is how
0.41.0 came to hold 69 open items. New pull requests now arrive with no
milestone and get one during triage.

The label job is unchanged and still runs on every push.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Juan Bustamante <bustamantejj@gmail.com>
@jjbustamante jjbustamante changed the title Skip assign a milestone to a PR when it already has one Stop auto-assigning a milestone to new pull requests Nov 25, 2026
jjbustamante and others added 2 commits November 25, 2026 08:24
Replaces the milestone that used to be assigned automatically with the label
that already means "a maintainer needs to look at this and categorise it", so
triage has a batch to work through and nothing arrives pre-sorted into a
release it may not belong to.

The issue templates apply status/triage already, but three paths bypass them:
a blank issue, anything opened through the API or gh, and every pull request.
Issues #2695, #2707, #2726, #2729, #2754, #2756, #2758, #2760 and #2761 all
arrived with no labels at all and had to be labelled by hand afterwards.

Anything that already carries a status/ label is left alone, so the issues the
bots file for CVEs and Go upgrades keep the status/ready or status/in-progress
they set themselves.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Juan Bustamante <bustamantejj@gmail.com>
Blank issues were enabled, which is the default, so the templates' labels were
bypassed whenever someone used "Open a blank issue". That is how #2754, #2756,
#2758, #2760 and #2761 arrived with no type/ label and no status/ label, and
their bodies follow none of the templates.

Turning blank issues off means every issue goes through Bug, Chore or Feature
request and arrives with both labels set. The Questions contact link to the
community discussions is unaffected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Juan Bustamante <bustamantejj@gmail.com>
@jjbustamante jjbustamante changed the title Stop auto-assigning a milestone to new pull requests Replace automatic milestone assignment with status/triage Nov 25, 2026
Dependabot sets the dependencies label itself in dependabot.yml, so treat that
as already categorised, the same as a status/ label. Its pull requests stay as
they are and are reviewed as a group rather than one at a time through triage.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Juan Bustamante <bustamantejj@gmail.com>
@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.08%. Comparing base (8967697) to head (c63cf73).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1812   +/-   ##
=======================================
  Coverage   67.08%   67.08%           
=======================================
  Files         267      267           
  Lines       14661    14661           
=======================================
  Hits         9834     9834           
  Misses       4827     4827           
Flag Coverage Δ
os_linux 66.76% <ø> (-<0.01%) ⬇️
os_macos-arm64 63.71% <ø> (ø)
os_windows 63.52% <ø> (ø)
unit 67.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jjbustamante
jjbustamante merged commit 8d78a82 into main Nov 25, 2026
18 checks passed
@jjbustamante
jjbustamante deleted the chore/skip-asign-milestone-when-already-set branch November 25, 2026 14:17
@jjbustamante jjbustamante self-assigned this Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/chore Issue that requests non-user facing changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants