cla.yml 2.4 KB

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