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 <raychen@microsoft.com>
This commit is contained in:
parent
3d07c4795f
commit
ad5bd689af
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user