-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (51 loc) · 2.58 KB
/
Copy pathcla.yml
File metadata and controls
54 lines (51 loc) · 2.58 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
name: CLA Assistant
on:
issue_comment:
types: [created]
pull_request_target:
types: [opened, closed, synchronize]
# CLA Assistant Lite needs to comment on PRs and write to the
# `cla-signatures` branch where signatures are recorded. `actions: write`
# is required by contributor-assistant/github-action v2.x — without it the
# job hits "Resource not accessible by integration" after recognising
# signatures, leaving the PR check stuck on failure even though the CLA is
# satisfied.
permissions:
actions: write
contents: write
pull-requests: write
statuses: write
jobs:
CLAAssistant:
# Job-level guard so `issue_comment` events that aren't the magic strings
# don't spin up a runner just to skip the only step.
if: |
github.event_name == 'pull_request_target' ||
github.event.comment.body == 'recheck' ||
github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA'
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
# Pinned to the immutable SHA of v2.6.1. `pull_request_target` runs with
# the base repo's GITHUB_TOKEN, so a moved tag would be a repo-takeover
# vector. Bump by replacing the SHA and updating the trailing comment.
uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 # v2.6.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
path-to-signatures: "signatures/version1/cla.json"
# Pinned to the immutable tag `cla-v1.1`, which freezes the agreed CLA
# text at a specific revision. A bare commit SHA is unsafe here: PRs are
# squash-merged, so a feature-branch commit is orphaned from main and
# 404s once its branch is pruned (exactly what happened to the previous
# c1193863 pin). A tag stays reachable regardless of merge strategy or
# branch cleanup. If you amend CLA.md, cut a NEW tag (cla-v1.2) on the
# amending commit and bump this ref in the same commit — never move an
# existing CLA tag; contributors have signed against it.
path-to-document: "https://github.com/Offline-Protocol/offline-protocol-sdk/blob/cla-v1.1/CLA.md"
# Signatures are committed to this branch — leave it unprotected.
branch: "cla-signatures"
# Allowlist GitHub App bot accounts (they have a "[bot]" suffix on the
# login). Do NOT use a bare "bot*" glob — it matches any human user
# whose login starts with "bot" and would let them skip the CLA.
allowlist: dependabot[bot],renovate[bot]