Skip to content

Commit c632a18

Browse files
Add CLA bot GitHub action (#3995)
Add CLA bot GitHub action fix format Co-authored-by: BenoitZugmeyer <benoit.zugmeyer@datadoghq.com> Co-authored-by: ara.pulido <ara.pulido@datadoghq.com>
1 parent 952793e commit c632a18

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/cla.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: 'CLA Assistant'
2+
on:
3+
issue_comment:
4+
types: [created]
5+
pull_request_target:
6+
types: [opened, closed, synchronize]
7+
merge_group:
8+
types: [checks_requested]
9+
10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
id-token: write # Needed to federate tokens.
14+
actions: write
15+
16+
jobs:
17+
CLAAssistant:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: CLA already verified on PR
21+
if: github.event_name == 'merge_group'
22+
run: echo "CLA verification not needed for merge queue - already checked on PR"
23+
24+
- uses: DataDog/dd-octo-sts-action@08f2144903ced3254a3dafec2592563409ba2aa0 # v1.0.1
25+
if: github.event_name != 'merge_group'
26+
id: octo-sts
27+
with:
28+
scope: DataDog/cla-signatures
29+
policy: self.write-signatures-browser-sdk
30+
31+
- name: 'CLA Assistant'
32+
if: github.event_name != 'merge_group' && ((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')
33+
uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 # v2.6.1
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
PERSONAL_ACCESS_TOKEN: ${{ steps.octo-sts.outputs.token }}
37+
with:
38+
path-to-signatures: 'browser-sdk.json'
39+
path-to-document: 'https://gist.github.com/bits-bot/55bdc97a4fdad52d97feb4d6c3d1d618' # Datadog CLA Document
40+
branch: 'browser-sdk'
41+
remote-repository-name: cla-signatures
42+
remote-organization-name: DataDog
43+
44+
# the followings are the optional inputs - If the optional inputs are not given, then default values will be taken
45+
#allowlist: user1,bot*
46+
#create-file-commit-message: 'For example: Creating file for storing CLA Signatures'
47+
#signed-commit-message: 'For example: $contributorName has signed the CLA in $owner/$repo#$pullRequestNo'
48+
#custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign'
49+
#custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA'
50+
#custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.'
51+
#lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)

0 commit comments

Comments
 (0)