From ad5bd689af2841a9b5510987f1fa4dbc2c3725ae Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 25 Sep 2025 14:26:42 -0700 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 12222 (#6753) * Set pr creator to empty when it's bot * Removed bot accounts while setting the reviewers and assignees * Allowed copilot as reviewer --------- Co-authored-by: ray chen --- eng/common/scripts/Submit-PullRequest.ps1 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/eng/common/scripts/Submit-PullRequest.ps1 b/eng/common/scripts/Submit-PullRequest.ps1 index a4c6545b8..a2de0a4f0 100644 --- a/eng/common/scripts/Submit-PullRequest.ps1 +++ b/eng/common/scripts/Submit-PullRequest.ps1 @@ -130,7 +130,8 @@ else { # ensure that the user that was used to create the PR is not attempted to add as a reviewer # we cast to an array to ensure that length-1 arrays actually stay as array values - $cleanedUsers = @(SplitParameterArray -members $UserReviewers) | ? { $_ -ne $prOwnerUser -and $null -ne $_ } + # we also filter out dependabot user who doesn't have write permission to avoid errors + $cleanedUsers = @(SplitParameterArray -members $UserReviewers) | ? { $_ -ne $prOwnerUser -and $null -ne $_ -and $_ -inotlike "dependabot*" } $cleanedTeamReviewers = @(SplitParameterArray -members $TeamReviewers) | ? { $_ -ne $prOwnerUser -and $null -ne $_ } if ($cleanedUsers -or $cleanedTeamReviewers) { @@ -146,8 +147,13 @@ else { $prState = "open" } + # Clean assignees - remove null entries and bot accounts + $cleanedAssignees = @(SplitParameterArray -members $Assignees) | ? { + $null -ne $_ -and $_ -inotlike "dependabot*" -and $_ -inotlike "copilot*" + } + Update-GitHubIssue -RepoOwner $RepoOwner -RepoName $RepoName -IssueNumber $prNumber ` - -State $prState -Labels $PRLabels -Assignees $Assignees -AuthToken $AuthToken + -State $prState -Labels $PRLabels -Assignees $cleanedAssignees -AuthToken $AuthToken if ($AddBuildSummary) { $summaryPath = New-TemporaryFile