ci: request-reviewers: do not request PR author (#1885)
Link: https://github.com/nix-community/stylix/pull/1885 Closes: https://github.com/nix-community/stylix/issues/1867 Reviewed-by: awwpotato <awwpotato@voidq.com>
This commit is contained in:
parent
b1a84f8982
commit
f6e9a1b624
1 changed files with 3 additions and 0 deletions
3
.github/workflows/request-reviewers.yml
vendored
3
.github/workflows/request-reviewers.yml
vendored
|
|
@ -39,6 +39,7 @@ jobs:
|
|||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
MAX_REVIEWERS: 5
|
||||
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
run: |
|
||||
printf \
|
||||
|
|
@ -46,6 +47,7 @@ jobs:
|
|||
"$(
|
||||
gh pr diff --name-only "$PR_NUMBER" |
|
||||
jq \
|
||||
--arg pr_author "$PR_AUTHOR" \
|
||||
--argjson max_reviewers "$MAX_REVIEWERS" \
|
||||
--raw-input \
|
||||
--raw-output \
|
||||
|
|
@ -67,6 +69,7 @@ jobs:
|
|||
)[]
|
||||
] |
|
||||
unique |
|
||||
map(select(. != $pr_author)) |
|
||||
if length <= $max_reviewers then
|
||||
. | join(",")
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue