From 30365a2d1eec1777b586bd4deba024523bee97f1 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 9 May 2021 19:16:25 -0700 Subject: [PATCH] Remove review requests when no longer needed If the PR is detected as something other than a submission, review is requested from a maintainer. It might be that the PR was intended to be a submission and the submitter is able to resolve whatever caused it to be detected as otherwise on their own. In this case, the automated system can handle things and review is no longer needed. --- .github/workflows/manage-prs.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/manage-prs.yml b/.github/workflows/manage-prs.yml index a65c03ba..71293dd7 100644 --- a/.github/workflows/manage-prs.yml +++ b/.github/workflows/manage-prs.yml @@ -179,6 +179,18 @@ jobs: echo "TEXT_REPORT_PATH=${{ runner.temp }}/report.txt" >> "$GITHUB_ENV" echo "ARDUINO_LINT_INSTALLATION_PATH=${{ runner.temp }}/arduino-lint" >> "$GITHUB_ENV" + # Submission PRs can be handled without maintainer involvement + - name: Remove prior review requests + uses: octokit/request-action@v2.x + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + route: DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers + owner: ${{ github.repository_owner }} + repo: ${{ github.event.repository.name }} + pull_number: ${{ github.event.pull_request.number }}${{ github.event.issue.number }} + reviewers: ${{ env.MAINTAINERS }} + - name: Comment on error detected while parsing submission if: matrix.submission.error != '' uses: octokit/request-action@v2.x