From 33cff7658ef0f9e524ec3cb95a217ad77dbdf728 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Thu, 21 Sep 2023 20:42:04 +0200 Subject: [PATCH 1/4] dont run on merge_group --- .github/workflows/check_cla.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_cla.yml b/.github/workflows/check_cla.yml index 057d3bc..326a612 100644 --- a/.github/workflows/check_cla.yml +++ b/.github/workflows/check_cla.yml @@ -19,7 +19,7 @@ jobs: check-membership: name: Check Membership runs-on: ubuntu-latest - if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.user.login != 'github-actions[bot]' }} + if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.user.login != 'github-actions[bot]' && github.event.label.name == 'merge_group' }} outputs: is_member: ${{ steps.check-membership.outputs.is_member}} steps: From 84aefe09f59f845bf447644adc95ad9ecc2fc7e2 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Thu, 21 Sep 2023 20:44:23 +0200 Subject: [PATCH 2/4] fix --- .github/workflows/check_cla.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_cla.yml b/.github/workflows/check_cla.yml index 326a612..0fbb36e 100644 --- a/.github/workflows/check_cla.yml +++ b/.github/workflows/check_cla.yml @@ -19,7 +19,7 @@ jobs: check-membership: name: Check Membership runs-on: ubuntu-latest - if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.user.login != 'github-actions[bot]' && github.event.label.name == 'merge_group' }} + if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.user.login != 'github-actions[bot]' && github.event.label.name != 'merge_group' }} outputs: is_member: ${{ steps.check-membership.outputs.is_member}} steps: From 5e63cd88fab879c692dccc7543f1ac8d63adf193 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Mon, 2 Oct 2023 10:25:40 +0200 Subject: [PATCH 3/4] switch to github actor --- .github/workflows/check_cla.yml | 3 ++- .../check_membership/check_membership/action.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_cla.yml b/.github/workflows/check_cla.yml index 0fbb36e..593ebe2 100644 --- a/.github/workflows/check_cla.yml +++ b/.github/workflows/check_cla.yml @@ -19,7 +19,8 @@ jobs: check-membership: name: Check Membership runs-on: ubuntu-latest - if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.user.login != 'github-actions[bot]' && github.event.label.name != 'merge_group' }} + # Dont run this workflow if it was triggered by one of these bots + if: contains(fromJson('["dependabot[bot]", "github-actions[bot]", "github-merge-queue[bot]"]'), github.actor) == false outputs: is_member: ${{ steps.check-membership.outputs.is_member}} steps: diff --git a/reusable_workflows/check_membership/check_membership/action.yml b/reusable_workflows/check_membership/check_membership/action.yml index 35a4a66..24124f6 100644 --- a/reusable_workflows/check_membership/check_membership/action.yml +++ b/reusable_workflows/check_membership/check_membership/action.yml @@ -10,7 +10,7 @@ inputs: required: true user: description: "The username" - default: ${{ github.event.pull_request.user.login }} + default: ${{ github.actor }} required: false outputs: is_member: From 4c09781b2581408420fb520e7c14fe1448ee54f3 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Mon, 2 Oct 2023 10:56:45 +0200 Subject: [PATCH 4/4] membership should be pull_request actor --- reusable_workflows/check_membership/check_membership/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reusable_workflows/check_membership/check_membership/action.yml b/reusable_workflows/check_membership/check_membership/action.yml index 24124f6..35a4a66 100644 --- a/reusable_workflows/check_membership/check_membership/action.yml +++ b/reusable_workflows/check_membership/check_membership/action.yml @@ -10,7 +10,7 @@ inputs: required: true user: description: "The username" - default: ${{ github.actor }} + default: ${{ github.event.pull_request.user.login }} required: false outputs: is_member: