File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,8 @@ else {
130
130
131
131
# ensure that the user that was used to create the PR is not attempted to add as a reviewer
132
132
# we cast to an array to ensure that length-1 arrays actually stay as array values
133
- $cleanedUsers = @ (SplitParameterArray - members $UserReviewers ) | ? { $_ -ne $prOwnerUser -and $null -ne $_ }
133
+ # we also filter out dependabot user who doesn't have write permission to avoid errors
134
+ $cleanedUsers = @ (SplitParameterArray - members $UserReviewers ) | ? { $_ -ne $prOwnerUser -and $null -ne $_ -and $_ -inotlike " dependabot*" }
134
135
$cleanedTeamReviewers = @ (SplitParameterArray - members $TeamReviewers ) | ? { $_ -ne $prOwnerUser -and $null -ne $_ }
135
136
136
137
if ($cleanedUsers -or $cleanedTeamReviewers ) {
@@ -146,8 +147,13 @@ else {
146
147
$prState = " open"
147
148
}
148
149
150
+ # Clean assignees - remove null entries and bot accounts
151
+ $cleanedAssignees = @ (SplitParameterArray - members $Assignees ) | ? {
152
+ $null -ne $_ -and $_ -inotlike " dependabot*" -and $_ -inotlike " copilot*"
153
+ }
154
+
149
155
Update-GitHubIssue - RepoOwner $RepoOwner - RepoName $RepoName - IssueNumber $prNumber `
150
- - State $prState - Labels $PRLabels - Assignees $Assignees - AuthToken $AuthToken
156
+ - State $prState - Labels $PRLabels - Assignees $cleanedAssignees - AuthToken $AuthToken
151
157
152
158
if ($AddBuildSummary ) {
153
159
$summaryPath = New-TemporaryFile
You can’t perform that action at this time.
0 commit comments