From c924c1a2bf18aaa212ea9a9eb92c48ab18b6e6d3 Mon Sep 17 00:00:00 2001 From: Carly Gundy <47304080+cgundy@users.noreply.github.com> Date: Tue, 3 Oct 2023 07:48:40 +0200 Subject: [PATCH 1/3] Add new workflow for public-workflows --- .github/workflows/check_signed_new.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/check_signed_new.yaml diff --git a/.github/workflows/check_signed_new.yaml b/.github/workflows/check_signed_new.yaml new file mode 100644 index 0000000..fb3003b --- /dev/null +++ b/.github/workflows/check_signed_new.yaml @@ -0,0 +1,21 @@ +# Workflow to check if a user has correctly signed the CLA + +name: Check Signed + +# on: +# issue_comment: + +jobs: + check-signed: + name: Check CLA signed + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + repository: dfinity/public-workflows + - name: Check CLA issue + uses: ./reusable_workflows/check_cla/check_cla_issue/ + env: + GH_TOKEN: ${{ github.token }} + ISSUE_ID: ${{ github.event.issue.number }} From 55722fa6c012109c0c5221e9819e623c4c648632 Mon Sep 17 00:00:00 2001 From: Carly Gundy <47304080+cgundy@users.noreply.github.com> Date: Tue, 3 Oct 2023 09:26:43 +0200 Subject: [PATCH 2/3] Directly run python --- .github/workflows/check_signed_new.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check_signed_new.yaml b/.github/workflows/check_signed_new.yaml index fb3003b..7f992ec 100644 --- a/.github/workflows/check_signed_new.yaml +++ b/.github/workflows/check_signed_new.yaml @@ -14,8 +14,18 @@ jobs: uses: actions/checkout@v3 with: repository: dfinity/public-workflows + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Install Dependencies + run: pip install -q -r requirements.txt + shell: bash - name: Check CLA issue - uses: ./reusable_workflows/check_cla/check_cla_issue/ + run: | + export PYTHONPATH="$PWD/reusable_workflows/" + python reusable_workflows/check_cla/check_cla_pr.py + shell: bash env: GH_TOKEN: ${{ github.token }} ISSUE_ID: ${{ github.event.issue.number }} From 375787319c9c7132147e1c2a3640dca7f413f7cd Mon Sep 17 00:00:00 2001 From: Carly Gundy <47304080+cgundy@users.noreply.github.com> Date: Tue, 3 Oct 2023 13:07:32 +0200 Subject: [PATCH 3/3] add label for testing --- .github/workflows/check_signed_new.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_signed_new.yaml b/.github/workflows/check_signed_new.yaml index 7f992ec..653585a 100644 --- a/.github/workflows/check_signed_new.yaml +++ b/.github/workflows/check_signed_new.yaml @@ -2,13 +2,15 @@ name: Check Signed -# on: -# issue_comment: +on: + issue_comment: jobs: check-signed: name: Check CLA signed runs-on: ubuntu-latest + # Todo: move once testing complete + if: ${{ github.event.label.name == 'test' }} steps: - name: Checkout uses: actions/checkout@v3