Skip to content

Commit 4825360

Browse files
authored
chore: add GitHub Action to mark CLA as passed for bot contributors (#1350)
* chore: add GitHub Action to mark CLA as passed for bot contributors The hosted cla-assistant.io webhook service does not apply the .clabot allowlist, leaving dependabot PRs in a permanent PENDING state. This workflow detects bot contributors (users with [bot] in their login) and explicitly sets the license/cla status to success using GITHUB_TOKEN, matching the same context the cla-assistant service uses. Human contributor PRs are unaffected and continue through the existing cla-assistant.io webhook flow. * fix: add least-privilege permissions block to CLA bot bypass workflow --------- Co-authored-by: Ben Coombs <bjcoombs@users.noreply.github.com>
1 parent 1f88774 commit 4825360

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/cla.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CLA Bot Bypass
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions: {}
8+
9+
jobs:
10+
cla-bot-bypass:
11+
permissions:
12+
statuses: write
13+
runs-on: ubuntu-latest
14+
if: contains(github.event.pull_request.user.login, '[bot]')
15+
steps:
16+
- name: Mark CLA passed for bot contributors
17+
run: |
18+
gh api "repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha }}" \
19+
--method POST \
20+
-f state=success \
21+
-f description="CLA not required for bot contributors" \
22+
-f context="license/cla" \
23+
-f target_url="https://cla-assistant.io/meridianhub/meridian"
24+
env:
25+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)