Skip to content

Commit

Permalink
Don't try to assign the author of a PR to review it
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoykov committed Jul 6, 2023
1 parent 5f0f914 commit 7ab37dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/pr-auto-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ jobs:
}
return result;
}
const reviewersWithoutAuthor = reviewers.filter(user => user !== context.payload.pull_request.user.login);
github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
reviewers: getNRandom(reviewerCount, reviewers),
reviewers: getNRandom(reviewerCount, reviewersWithoutAuthor),
});

0 comments on commit 7ab37dd

Please sign in to comment.