Skip to content

Commit 5c1ac62

Browse files
committed
Fix error when PR author tries to add themselves as reviewer
HTTP 422 error occurred when PR author and repository owner were the same person Added condition to only add reviewer when PR author is not the repository owner
1 parent 90aff98 commit 5c1ac62

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.github/workflows/pr-automation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
pull-requests: write
1313
steps:
1414
- name: Add owner as reviewer
15+
if: github.event.pull_request.user.login != github.repository_owner
1516
run: |
1617
gh pr edit ${{ github.event.pull_request.number }} \
1718
--add-reviewer ${{ github.repository_owner }} \

0 commit comments

Comments
 (0)