From 03dce76c0ecdad0a984921533b84530e326942f7 Mon Sep 17 00:00:00 2001 From: Alexis Rolland Date: Thu, 2 Jul 2026 13:18:18 +0800 Subject: [PATCH] Refactor CLA workflow to include issue comments --- .github/workflows/cla.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 5fcbe15ec..b75397e50 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -5,7 +5,6 @@ on: types: [created] pull_request_target: types: [opened, synchronize, closed] - merge_group: permissions: actions: write @@ -24,8 +23,10 @@ jobs: id: allowlist if: > github.event_name == 'pull_request_target' || - github.event.comment.body == 'recheck' || - github.event.comment.body == 'I have read and agree to the Contributor License Agreement' + (github.event_name == 'issue_comment' && github.event.issue.pull_request && ( + github.event.comment.body == 'recheck' || + github.event.comment.body == 'I have read and agree to the Contributor License Agreement' + )) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }} @@ -46,8 +47,10 @@ jobs: # IMPORTANT: this phrase must match `custom-pr-sign-comment` below. if: > github.event_name == 'pull_request_target' || - github.event.comment.body == 'recheck' || - github.event.comment.body == 'I have read and agree to the Contributor License Agreement' + (github.event_name == 'issue_comment' && github.event.issue.pull_request && ( + github.event.comment.body == 'recheck' || + github.event.comment.body == 'I have read and agree to the Contributor License Agreement' + )) uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 # v2.6.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}