From c4c45089f7d0c14658407f1318e140636427f921 Mon Sep 17 00:00:00 2001 From: per1234 Date: Mon, 10 May 2021 03:43:54 -0700 Subject: [PATCH] Don't request review for PRs from maintainer Review requests to the PR author are not allowed. Previously, there would be a spurious workflow failure for every PR from a user in the `env.MAINTAINERS` array. When a maintainer is submitting a PR, they can request reviews as needed, so the automated review request can simply be skipped in this case. --- .github/workflows/manage-prs.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/manage-prs.yml b/.github/workflows/manage-prs.yml index e4e0f909..a65c03ba 100644 --- a/.github/workflows/manage-prs.yml +++ b/.github/workflows/manage-prs.yml @@ -405,6 +405,7 @@ jobs: Once that is done, it will be merged automatically. - name: Request a review in case assistance is required + if: contains(toJSON(env.MAINTAINERS), github.actor) != true # Don't attempt to request review from PR author. uses: octokit/request-action@v2.x env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -423,6 +424,7 @@ jobs: steps: - name: Request pull request review + if: contains(toJSON(env.MAINTAINERS), github.actor) != true uses: octokit/request-action@v2.x env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -472,6 +474,7 @@ jobs: - "status: maintenance required" - name: Request pull request review + if: contains(toJSON(env.MAINTAINERS), github.actor) != true uses: octokit/request-action@v2.x env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}