Skip VMR user change validation for dotnet-bot PRs#4538
Conversation
Co-authored-by: ellahathaway <67609881+ellahathaway@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR modifies the ValidateUserChanges pipeline stage to skip validation for pull requests created by dotnet-bot, preventing automated PRs from being incorrectly blocked as user changes requiring validation.
Changes:
- Added
Build.RequestedForcheck to exclude dotnet-bot from ValidateUserChanges stage validation in the PR pipeline - Follows the existing pattern of skipping validation for DARC automated branches
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| not(startsWith(variables['System.PullRequest.SourceBranch'], 'refs/heads/darc-')), | ||
| not(startsWith(variables['System.PullRequest.SourceBranch'], 'darc-')) | ||
| not(startsWith(variables['System.PullRequest.SourceBranch'], 'darc-')), | ||
| not(eq(variables['Build.RequestedFor'], 'dotnet-bot')) |
There was a problem hiding this comment.
Consider adding a pipeline run with logging to verify that Build.RequestedFor equals exactly "dotnet-bot" for bot-created PRs. Azure Pipelines populates this variable with the GitHub user's display name, which should be "dotnet-bot" for the bot account, but it's worth confirming. If this check doesn't work as expected, alternative options include: checking Build.RequestedForEmail (e.g., ends with @users.noreply.github.com), or combining this with additional branch name patterns that dotnet-bot uses.
|
/backport to release/10.0.1xx |
|
Started backporting to |
|
@ellahathaway backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Patch format detection failed.
Error: The process '/usr/bin/git' failed with exit code 128 |
|
/backport to release/10.0.1xx |
|
/backport to release/10.0.2xx |
|
Started backporting to |
|
/backport to release/10.0.3xx |
|
Started backporting to |
|
Started backporting to |
|
@ellahathaway backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Creating an empty commit: Initial plan
Applying: Update ValidateUserChanges stage to skip dotnet-bot PRs
Using index info to reconstruct a base tree...
M eng/pipelines/pr.yml
Falling back to patching base and 3-way merge...
Auto-merging eng/pipelines/pr.yml
CONFLICT (content): Merge conflict in eng/pipelines/pr.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0002 Update ValidateUserChanges stage to skip dotnet-bot PRs
Error: The process '/usr/bin/git' failed with exit code 128 |
|
@ellahathaway backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Creating an empty commit: Initial plan
Applying: Update ValidateUserChanges stage to skip dotnet-bot PRs
Using index info to reconstruct a base tree...
M eng/pipelines/pr.yml
Falling back to patching base and 3-way merge...
Auto-merging eng/pipelines/pr.yml
CONFLICT (content): Merge conflict in eng/pipelines/pr.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0002 Update ValidateUserChanges stage to skip dotnet-bot PRs
Error: The process '/usr/bin/git' failed with exit code 128 |
|
@ellahathaway backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Creating an empty commit: Initial plan
Applying: Update ValidateUserChanges stage to skip dotnet-bot PRs
Using index info to reconstruct a base tree...
M eng/pipelines/pr.yml
Falling back to patching base and 3-way merge...
Auto-merging eng/pipelines/pr.yml
CONFLICT (content): Merge conflict in eng/pipelines/pr.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0002 Update ValidateUserChanges stage to skip dotnet-bot PRs
Error: The process '/usr/bin/git' failed with exit code 128 |
The ValidateUserChanges pipeline stage was blocking automated PRs from dotnet-bot, treating them as user changes requiring validation.
Changes
Build.RequestedForcheck to exclude dotnet-bot from the ValidateUserChanges stage condition ineng/pipelines/pr.ymlThis follows the existing pattern where DARC branches skip validation, extending it to all dotnet-bot automated changes.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.