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 {
130130
131131 # ensure that the user that was used to create the PR is not attempted to add as a reviewer
132132 # 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*" }
134135 $cleanedTeamReviewers = @ (SplitParameterArray - members $TeamReviewers ) | ? { $_ -ne $prOwnerUser -and $null -ne $_ }
135136
136137 if ($cleanedUsers -or $cleanedTeamReviewers ) {
@@ -146,8 +147,13 @@ else {
146147 $prState = " open"
147148 }
148149
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+
149155 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
151157
152158 if ($AddBuildSummary ) {
153159 $summaryPath = New-TemporaryFile
You can’t perform that action at this time.
0 commit comments