forked from modular/modular
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (57 loc) · 2.52 KB
/
cla.yml
File metadata and controls
62 lines (57 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
##===----------------------------------------------------------------------===##
# Copyright (c) 2025, Modular Inc. All rights reserved.
#
# Licensed under the Apache License v2.0 with LLVM Exceptions:
# https://llvm.org/LICENSE.txt
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##===----------------------------------------------------------------------===##
name: "CLA Assistant"
on:
issue_comment:
types: [created]
pull_request_target:
types: [opened, synchronize]
# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
permissions:
actions: write
contents: read
pull-requests: write
statuses: write
jobs:
CLAAssistant:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e
id: app-token
with:
app-id: ${{ vars.CLA_BOT_CLIENT_ID }}
private-key: ${{ secrets.CLA_BOT_PRIVATE_KEY }}
owner: modular
repositories: cla
permission-contents: write
- name: "Print github object"
env:
GITHUB_JSON: ${{ toJson(github) }}
run: |
echo "Full github context:"
echo "$GITHUB_JSON"
- name: "CLA Assistant"
if: github.actor != 'modularbot' && ((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')
uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# the below token should have repo scope and must be manually added by you in the repository's secret
# This token is required only if you have configured to store the signatures in a remote repository/organization
PERSONAL_ACCESS_TOKEN: ${{ steps.app-token.outputs.token }}
with:
path-to-document: "https://github.com/modular/cla/blob/main/CLA.md" # e.g. a CLA or a DCO document
branch: "main"
remote-organization-name: "modular"
remote-repository-name: "cla"
path-to-signatures: "signatures/version1/cla.json"