|
| 1 | +name: "CLA Assistant" |
| 2 | + |
| 3 | +on: |
| 4 | + issue_comment: |
| 5 | + types: [created] |
| 6 | + pull_request_target: |
| 7 | + types: [opened, reopened, closed, synchronize] |
| 8 | + |
| 9 | +permissions: |
| 10 | + actions: write |
| 11 | + contents: write |
| 12 | + pull-requests: write |
| 13 | + statuses: write |
| 14 | + |
| 15 | +jobs: |
| 16 | + cla-check: |
| 17 | + if: | |
| 18 | + github.repository == 'Wei-Shaw/sub2api' && |
| 19 | + ( |
| 20 | + github.event_name == 'issue_comment' || |
| 21 | + (github.event_name == 'pull_request_target' && github.event.action != 'closed') |
| 22 | + ) |
| 23 | + runs-on: ubuntu-latest |
| 24 | + steps: |
| 25 | + - name: "CLA Assistant" |
| 26 | + if: | |
| 27 | + (github.event.comment.body == 'recheck' || |
| 28 | + github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || |
| 29 | + github.event_name == 'pull_request_target' |
| 30 | + uses: contributor-assistant/github-action@v2.6.1 |
| 31 | + env: |
| 32 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 33 | + with: |
| 34 | + path-to-signatures: "cla.json" |
| 35 | + path-to-document: "https://github.com/Wei-Shaw/sub2api/blob/main/CLA.md" |
| 36 | + branch: "cla-signatures" |
| 37 | + allowlist: "dependabot[bot],renovate[bot],bot*" |
| 38 | + lock-pullrequest-aftermerge: false |
| 39 | + custom-notsigned-prcomment: | |
| 40 | + Thank you for your contribution! Before we can merge this PR, we need $you to sign our [Contributor License Agreement (CLA)](https://github.com/Wei-Shaw/sub2api/blob/main/CLA.md). |
| 41 | +
|
| 42 | + **To sign**, please reply with the following comment: |
| 43 | +
|
| 44 | + > I have read the CLA Document and I hereby sign the CLA |
| 45 | +
|
| 46 | + You only need to sign once — it will be valid for all your future contributions to this project. |
| 47 | + custom-pr-sign-comment: "I have read the CLA Document and I hereby sign the CLA" |
| 48 | + custom-allsigned-prcomment: "All contributors have signed the CLA. ✅" |
| 49 | + |
| 50 | + cla-lock: |
| 51 | + if: | |
| 52 | + github.repository == 'Wei-Shaw/sub2api' && |
| 53 | + github.event_name == 'pull_request_target' && |
| 54 | + github.event.action == 'closed' && |
| 55 | + github.event.pull_request.merged == true |
| 56 | + runs-on: ubuntu-latest |
| 57 | + steps: |
| 58 | + - name: "Lock merged PR" |
| 59 | + uses: contributor-assistant/github-action@v2.6.1 |
| 60 | + env: |
| 61 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 62 | + with: |
| 63 | + path-to-signatures: "cla.json" |
| 64 | + path-to-document: "https://github.com/Wei-Shaw/sub2api/blob/main/CLA.md" |
| 65 | + branch: "cla-signatures" |
| 66 | + lock-pullrequest-aftermerge: true |
0 commit comments