1
0
mirror of https://github.com/arduino/library-registry.git synced 2025-07-29 14:01:15 +03:00

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.
This commit is contained in:
per1234
2021-05-09 19:16:25 -07:00
parent fe3ff1cd3e
commit 30365a2d1e

View File

@ -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