From 8a5f0ae638858e34609488ff9e6ebca1f1c8c9ad Mon Sep 17 00:00:00 2001 From: mfw78 <53399572+mfw78@users.noreply.github.com> Date: Tue, 19 Dec 2023 14:28:43 +0000 Subject: [PATCH] chore: pm cicd (#54) This PR: 1. Enforces all contributors, including team members, must sign the CLA. 2. Applies project management workflows to automatically add issues to the project tracker. ## Test Plan Observe tests still pass (no regression) --- .github/workflows/add-action-project.yml | 16 ++++++++ .github/workflows/cla.yml | 48 +++++++++++++----------- 2 files changed, 43 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/add-action-project.yml diff --git a/.github/workflows/add-action-project.yml b/.github/workflows/add-action-project.yml new file mode 100644 index 0000000..ce969e7 --- /dev/null +++ b/.github/workflows/add-action-project.yml @@ -0,0 +1,16 @@ +name: Add new issues to project board + +on: + issues: + types: [opened] + +jobs: + add-to-project: + if: github.repository_owner == 'cowprotocol' + name: Add issue to project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.3.0 + with: + project-url: https://github.com/orgs/cowprotocol/projects/8 + github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index ba2490b..776719b 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -1,23 +1,29 @@ - name: "cla" +name: "cla" - on: - issue_comment: - types: [created] - pull_request_target: - types: [opened, closed, synchronize] +on: + issue_comment: + types: [created] + pull_request_target: + types: [opened, closed, synchronize] - jobs: - cla: - runs-on: ubuntu-latest - steps: - - name: "CLA Assistant" - if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' - uses: contributor-assistant/github-action@v2.2.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PERSONAL_ACCESS_TOKEN : ${{ secrets.ORG_TOKEN }} - with: - branch: 'cla-signatures' - path-to-signatures: 'signatures/version1/cla.json' - path-to-document: 'https://github.com/cowprotocol/cla/blob/main/CLA.md' - allowlist: '*[bot]' +permissions: + actions: write + contents: write + pull-requests: write + statuses: write + +jobs: + cla: + runs-on: ubuntu-latest + steps: + - name: "CLA Assistant" + if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' + uses: contributor-assistant/github-action@v2.2.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PERSONAL_ACCESS_TOKEN : ${{ secrets.ORG_TOKEN }} + with: + branch: 'cla-signatures' + path-to-signatures: 'signatures/version1/cla.json' + path-to-document: 'https://github.com/cowprotocol/cla/blob/main/CLA.md' + allowlist: '*[bot]'