Integration Test Nonexistent Repo #326
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow to check if a user is eligible to contribute or needs to sign the CLA | |
name: Check CLA | |
on: | |
pull_request: | |
branches: '**' | |
merge_group: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
check-cla: | |
name: Check CLA | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
repository: 'dfinity/repositories-open-to-contributions' | |
- name: Check Membership | |
id: check-membership | |
uses: ./.github/actions/check_membership/ | |
with: | |
github-token: ${{ secrets.CLA_READ_ORG_MEMBERSHIP }} | |
- name: Check if accepting external contributions | |
id: accepts_external_contrib | |
if: steps.check-membership.outputs.is_member != 'true' | |
uses: ./.github/actions/check_external_contrib/ | |
- name: Close Pull Request | |
id: close_pr | |
if: steps.check-membership.outputs.is_member != 'true' && steps.accepts_external_contrib.outputs.accepts_contrib != 'true' | |
run: | | |
message="This repository does not accept external contributions yet. | |
We are therefore closing this Pull Request, thank you for your understanding. | |
— The DFINITY Foundation" | |
gh pr close ${{ github.event.number }} --comment "$message" | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: Add Label | |
uses: actions-ecosystem/action-add-labels@v1 | |
if: steps.check-membership.outputs.is_member != 'true' && steps.accepts_external_contrib.outputs.accepts_contrib != 'false' | |
with: | |
labels: external-contributor | |
- name: Check CLA | |
id: check-cla | |
uses: ./.github/actions/check_cla_pr/ | |
if: steps.check-membership.outputs.is_member != 'true' && steps.accepts_external_contrib.outputs.accepts_contrib != 'false' | |
with: | |
github-token: ${{ secrets.CLA_COMMENT_ON_PRS }} |