Skip to content

Commit

Permalink
Skip the review-testing-instructions workflow on PR's from communit…
Browse files Browse the repository at this point in the history
…y contributors (#37813)
  • Loading branch information
nigeljamesstevenson committed Apr 19, 2023
2 parents 9260e81 + dfb23ea commit 950bf93
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/review-testing-instructions.yml
Expand Up @@ -11,7 +11,25 @@ jobs:
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c

- name: Install Octokit
run: npm --prefix .github/workflows/scripts install @octokit/action

- name: Install Actions Core
run: npm --prefix .github/workflows/scripts install @actions/core

- name: Check if user is a community contributor
id: is-community-contributor
run: node .github/workflows/scripts/is-community-contributor.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get the username of requested reviewers
if: steps.is-community-contributor.outputs.is-community == 'no'
id: get_reviewer_username
run: |
# Retrieves the username of all reviewers and stores them in a comma-separated list
Expand Down
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Add the ability to skip the `review-testing-instructions` workflow when the PR is from an external contributor.

0 comments on commit 950bf93

Please sign in to comment.