FileExplorer Unit Tests #283
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Label AI-generated PRs | |
| on: | |
| pull_request_target: | |
| types: [opened, edited] | |
| permissions: | |
| pull-requests: write | |
| issues: write | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const pr = context.payload.pull_request; | |
| const body = (pr.body || '').toLowerCase(); | |
| const title = (pr.title || '').toLowerCase(); | |
| if (body.includes('kumquat') || title.includes('kumquat') || body.includes('generated with claude code')) { | |
| await github.rest.issues.addLabels({ | |
| ...context.repo, | |
| issue_number: pr.number, | |
| labels: ['ai-generated'], | |
| }); | |
| await github.rest.issues.createComment({ | |
| ...context.repo, | |
| issue_number: pr.number, | |
| body: 'This PR has been flagged as AI generated and labelled accordingly.', | |
| }); | |
| } |