Skip to content

Skip dependency update when non-bot commits are detected on PR branch#7050

Merged
lbussell merged 3 commits intodotnet:nightlyfrom
lbussell:no-overwrite-pr
Feb 23, 2026
Merged

Skip dependency update when non-bot commits are detected on PR branch#7050
lbussell merged 3 commits intodotnet:nightlyfrom
lbussell:no-overwrite-pr

Conversation

@lbussell
Copy link
Member

When the nightly dependency update pipeline runs and an existing update PR already exists (e.g., [nightly] Update dependencies from dotnet/dotnet), the UpdateExistingGitHubPullRequest method replaces the entire PR branch contents with the newly computed state. This overwrites any manual commits that someone may have added to the PR — such as fixups, cherry-picks, or review-related changes.

Changes

Before pushing updated dependency changes to an existing PR branch, we now check whether any commits on the branch were authored by someone other than the bot. If non-bot commits are found:

  1. The push is skipped — the PR branch is left as-is.
  2. A comment is posted on the PR listing the non-bot commits and providing a dotnet run command that authors can copy-paste to apply the dependency update locally on their branch.

Scope

This affects nightly update PRs for:

  • dotnet/dotnet
  • dotnet/aspire
  • Tools (chisel, syft, rocks-toolbox, mingit)

It does not affect:

  • First-time PR creation (no existing PR to check)
  • Azure DevOps dependency flows

@lbussell lbussell requested a review from a team as a code owner February 23, 2026 18:08
@lbussell lbussell merged commit fbabb8a into dotnet:nightly Feb 23, 2026
7 checks passed
@lbussell lbussell deleted the no-overwrite-pr branch February 23, 2026 21:21
@github-actions github-actions bot added the needs-backport PR that should be backported to another branch label Feb 23, 2026
lbussell added a commit to lbussell/dotnet-docker that referenced this pull request Mar 5, 2026
lbussell added a commit to lbussell/dotnet-docker that referenced this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-backport PR that should be backported to another branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants