Skip to content

Prevent milestoning unmerged codeflow PRs - #8596

Merged
wtgodbe merged 1 commit into
mainfrom
wtgodbe/skip-unmerged-codeflow-milestones
Aug 24, 2026
Merged

wtgodbe merged 1 commit into
mainfrom
wtgodbe/skip-unmerged-codeflow-milestones

Conversation

@wtgodbe

@wtgodbe wtgodbe commented Aug 24, 2026

Copy link
Copy Markdown
Member

Summary

  • Skip child PRs that do not have a merge timestamp before applying a milestone.
  • Use the same guard during the final pre-write recheck.

Context

GitHub associatedPullRequests can include an open PR when a commit in the flowed range is the PR base commit rather than a commit introduced by that PR. This caused dotnet/efcore#38848 to receive the RC2 milestone from this workflow run before it was merged.

Validation

  • Parsed the workflow YAML.
  • Checked the embedded github-script JavaScript syntax.

Copilot AI lite review requested due to automatic review settings August 24, 2026 16:13
@wtgodbe
wtgodbe requested review from a team as code owners August 24, 2026 16:13
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the VMR milestoning workflow logic to avoid applying milestones to child pull requests that are referenced by associatedPullRequests but have not actually been merged, preventing incorrect milestone assignment during codeflow processing.

Changes:

  • Add a guard in decideMilestoneAction to skip PRs without a merge timestamp (merged_at).
  • Reuse the same guard for both the initial decision and the final pre-write recheck (via the shared helper).

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@wtgodbe
wtgodbe enabled auto-merge (squash) August 24, 2026 16:41
@wtgodbe
wtgodbe merged commit da1fcc1 into main Aug 24, 2026
12 checks passed
@wtgodbe
wtgodbe deleted the wtgodbe/skip-unmerged-codeflow-milestones branch August 24, 2026 18:31
@wtgodbe

wtgodbe commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

/backport to release/11.0.1xx

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/11.0.1xx (link to workflow run)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants