Skip to content

Commit 3fb4f3f

Browse files
authored
CI: add cla.yml to check CLA (#41)
1 parent 07bd4fc commit 3fb4f3f

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/cla.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "CLA Assistant"
2+
on:
3+
issue_comment:
4+
types: [created]
5+
pull_request_target:
6+
types: [opened, closed, synchronize, reopened]
7+
8+
# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
9+
permissions:
10+
actions: write
11+
contents: write
12+
pull-requests: write
13+
statuses: write
14+
15+
jobs:
16+
CLAAssistant:
17+
runs-on: [self-hosted, trpc-cpp-ci]
18+
steps:
19+
- name: "CLA Assistant"
20+
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'
21+
uses: contributor-assistant/github-action@v2.3.1
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_DATABASE_ACCESS_TOKEN }}
25+
with:
26+
remote-organization-name: trpc-group
27+
remote-repository-name: cla-database
28+
path-to-signatures: 'signatures/${{ github.event.repository.name }}-${{ github.repository_id }}/cla.json'
29+
path-to-document: 'https://github.com/trpc-group/cla-database/blob/main/Tencent-Contributor-License-Agreement.md'
30+
# branch should not be protected
31+
branch: 'main'

0 commit comments

Comments
 (0)