| name: Commit Access Review | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # * is a special character in YAML so you have to quote this string | |
| - cron: '0 7 1 * *' | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| commit-access-review: | |
| if: github.repository_owner == 'llvm' | |
| environment: main-branch-only | |
| runs-on: ubuntu-26.04 | |
| steps: | |
| - name: Fetch LLVM sources | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install dependencies | |
| run: | | |
| pip install --require-hashes -r ./llvm/utils/git/requirements.txt | |
| - id: app-token | |
| uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 | |
| with: | |
| client-id: ${{ secrets.LLVM_TOKEN_GENERATOR_CLIENT_ID }} | |
| private-key: ${{ secrets.LLVM_TOKEN_GENERATOR_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| repositories: ${{ github.repository }} | |
| permission-members: read | |
| permission-contents: read | |
| - name: Run Script | |
| env: | |
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
| run: | | |
| python3 .github/workflows/commit-access-review.py $GITHUB_TOKEN | |
| - name: Upload Triage List | |
| uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | |
| with: | |
| name: triagers | |
| path: triagers.log | |
| - name: Create the issue | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: | | |
| # There is a limit to the number of mentions you can have in one comment, so | |
| # we need to limit the number of users we mention. | |
| cat triagers.log | head -n 25 | python3 .github/workflows/commit-create-issue.py $GITHUB_TOKEN |