Skip to content

Commit

Permalink
chore(IDX): remove CLA dev workflow (#105)
Browse files Browse the repository at this point in the history
* remove dev workflow

* update comment

* rename
  • Loading branch information
cgundy authored Jan 27, 2025
1 parent 29416e2 commit fca7cbe
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 107 deletions.
93 changes: 0 additions & 93 deletions .github/workflows/check_cla.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/workflows/check_cla_dev.yml

This file was deleted.

87 changes: 84 additions & 3 deletions .github/workflows/check_cla_ruleset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,89 @@ on:
- 'master'
- 'main'
merge_group:

jobs:
call-check-cla:
uses: dfinity/public-workflows/.github/workflows/check_cla.yml@main
check-membership:
uses: dfinity/public-workflows/.github/workflows/check_membership.yml@main
secrets: inherit

check-external-contributions:
name: Check External Contributions
runs-on: ubuntu-latest
needs: check-membership
if: ${{ needs.check-membership.outputs.is_member != 'true' && needs.check-membership.result == 'success' }}
steps:
- name: Create GitHub App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.CLA_BOT_APP_ID }}
private-key: ${{ secrets.CLA_BOT_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@v4
with:
repository: 'dfinity/public-workflows'

- name: Python Setup
uses: ./.github/workflows/python-setup

- name: Check if accepting external contributions
id: accepts_external_contrib
run: |
export PYTHONPATH="$PWD/reusable_workflows/"
python reusable_workflows/check_membership/check_external_contrib.py
shell: bash
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.event.repository.name }}

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Close Pull Request
id: close_pr
if: ${{ steps.accepts_external_contrib.outputs.accepts_contrib != 'true' }}
uses: superbrothers/close-pull-request@v3
with:
comment: |
Thank you for contributing! Unfortunately this repository does not accept external contributions yet.
We are working on enabling this by aligning our internal processes and our CI setup to handle external contributions. However this will take some time to set up so in the meantime we unfortunately have to close this Pull Request.
We hope you understand and will come back once we accept external PRs.
— The DFINITY Foundation"""
- name: Add Label
uses: actions/github-script@v6
if: ${{ steps.accepts_external_contrib.outputs.accepts_contrib != 'false' }}
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["external-contributor"]
})
- name: Checkout
uses: actions/checkout@v4
if: ${{ steps.accepts_external_contrib.outputs.accepts_contrib != 'false' }}
with:
repository: 'dfinity/public-workflows'

- name: Check CLA
id: check-cla
run: |
export PYTHONPATH="$PWD/reusable_workflows/"
python reusable_workflows/check_cla/check_cla_pr.py
shell: bash
if: ${{ steps.accepts_external_contrib.outputs.accepts_contrib != 'false' }}
env:
GH_ORG: ${{ github.repository_owner }}
GH_TOKEN: ${{ steps.app-token.outputs.token }}
REPO: ${{ github.event.repository.name }}
PR_ID: ${{ github.event.number }}
1 change: 1 addition & 0 deletions .github/workflows/check_cla_signed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

name: Check Issue Signed

# this workflow is triggered from the repo https://github.com/dfinity/cla
on:
workflow_call:

Expand Down

0 comments on commit fca7cbe

Please sign in to comment.