Repository navigation
71 lines (69 loc) · 4.15 KB
/
Copy pathcla.yml
File metadata and controls
71 lines (69 loc) · 4.15 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
63
64
65
66
67
68
69
70
71
# CLA Assistant — gates pull requests on a signed Contributor License Agreement.
#
# How it works: when someone opens a PR, the bot checks whether they've signed. If not, it
# comments asking them to sign by replying with the exact phrase below; their signature is
# recorded in signatures/version1/cla.json in this repo. Maintainers in `allowlist` are
# never asked.
#
# ── SETUP (two one-time steps) ─────────────────────────────────────────────────────────
# 1. Create a Personal Access Token (classic, `repo` scope — or a fine-grained token with
# Contents + Pull requests write on this repo) and add it as a repo secret named
# PERSONAL_ACCESS_TOKEN. It's needed so the bot can commit signatures + comment.
# 2. Edit `allowlist` below to your maintainers' GitHub usernames (so you don't have to sign
# your own PRs).
# Until step 1 is done the workflow is inert (it just won't run successfully) — it does not
# block anything else.
name: CLA Assistant
on:
issue_comment:
types: [created]
pull_request_target:
types: [opened, closed, synchronize]
# Nothing at the top level beyond reading the repository. The grants the
# CLA job needs are on the job itself, below.
permissions:
contents: read
jobs:
cla:
runs-on: ubuntu-latest
# What contributor-assistant/github-action does with the workflow token:
# contents: write commits each new signature to
# signatures/version1/cla.json on main
# pull-requests: write posts and updates the CLA comment on the pull request
# actions: write re-runs the pull request's failed CLA run once
# everyone has signed
# It never calls the commit statuses API, so `statuses: write` is not
# granted; the CLA result is the job's own pass or fail.
permissions:
actions: write
contents: write
pull-requests: write
steps:
- name: CLA Assistant
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'
uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 # v2.6.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
with:
path-to-signatures: 'signatures/version1/cla.json'
path-to-document: 'https://github.com/Calnode/calnode/blob/main/CLA.md'
branch: 'main'
custom-notsigned-prcomment: 'Thanks for your contribution! Before we can merge it, please read our [Contributor License Agreement](https://github.com/Calnode/calnode/blob/main/CLA.md) and sign it by posting the exact comment below in this PR.'
custom-pr-sign-comment: 'I have read the CLA Document and I hereby sign the CLA'
custom-allsigned-prcomment: 'All contributors have signed the CLA. ✅'
# TODO: replace with your maintainers' GitHub usernames.
allowlist: 'shockalotti,dependabot[bot]'
# The action's default is 'true', which locks every merged PR's conversation. That
# silently blocks all post-merge activity: a bot cannot post a review, and a mention
# on a merged PR can never be answered. It caused a green pullfrog run that produced
# nothing, which reads as a broken integration rather than a lock.
#
# Disabling it does NOT let contributors revoke their CLA, which is what the lock
# exists for. The record is not the signing comment: signatures are appended to
# signatures/version1/cla.json, committed to main, and the action only ever appends
# (src/persistence/persistence.ts does push(), never a removal). An outside
# contributor has no write access to this repository and cannot alter that ledger or
# rewrite main's history. The "CLA ledger is append-only" step in ci.yml enforces
# that no pull request ever removes a recorded signature.
lock-pullrequest-aftermerge: 'false'