Skip to content

Commit 8b7bbbe

Browse files
authored
Merge pull request #22 from winstonwumbo/main
[ci/cd] Add CLA GitHub Action
2 parents b65ceac + 122b253 commit 8b7bbbe

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/cla.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "CLA Assistant"
2+
on:
3+
issue_comment:
4+
types: [created]
5+
pull_request_target:
6+
types: [opened, closed, synchronize]
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: read # this can be 'read' if the signatures are in remote repository
12+
pull-requests: write
13+
statuses: write
14+
15+
jobs:
16+
CLAAssistant:
17+
runs-on: ubuntu-latest
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.6.1
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_ACCESS_TOKEN }}
25+
with:
26+
path-to-signatures: 'signatures/version1/cla.json'
27+
path-to-document: 'https://github.com/haxtheweb/cla/blob/main/CLA.md'
28+
# branch should not be protected
29+
branch: 'main'
30+
allowlist: bot*
31+
# the followings are the optional inputs - If the optional inputs are not given, then default values will be taken
32+
remote-organization-name: 'haxtheweb'
33+
remote-repository-name: 'cla'
34+
create-file-commit-message: 'Creating file for storing CLA Signatures'
35+
signed-commit-message: 'CLA signed by $contributorName'
36+
custom-notsigned-prcomment: 'Thank you for your contribution! Before we can merge your PR, we need you to sign our Contributor License Agreement (CLA). Please comment **"I have read the CLA Document and I hereby sign the CLA"** to agree to the [CLA terms](https://github.com/haxtheweb/cla/blob/main/CLA.md).'
37+
custom-allsigned-prcomment: 'All contributors have signed the CLA. Thank you!'

0 commit comments

Comments
 (0)