From f6e9a1b62457efcbf48a09aafbf7233f306fcdc9 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sat, 6 Sep 2025 02:50:48 +0200 Subject: [PATCH] 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 --- .github/workflows/request-reviewers.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/request-reviewers.yml b/.github/workflows/request-reviewers.yml index b5f452e5..4ab5e94a 100644 --- a/.github/workflows/request-reviewers.yml +++ b/.github/workflows/request-reviewers.yml @@ -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