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