Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip the review-testing-instructions workflow on PR's from community contributors #37813

Merged
merged 2 commits into from Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.