CodeRabbit Plan Trigger #13
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
| # Triggers CodeRabbit plan only as an assignment fallback. | |
| # Primary trigger path is the approved workflow after unlock. | |
| name: CodeRabbit Plan Trigger | |
| on: | |
| issues: | |
| types: [assigned] | |
| permissions: | |
| issues: write | |
| contents: read | |
| jobs: | |
| coderabbit_plan_trigger: | |
| runs-on: hl-sdk-py-lin-md | |
| concurrency: | |
| group: coderabbit-plan-${{ github.event.issue.number }} | |
| cancel-in-progress: false | |
| # Fallback only: assigned, open, unlocked, approved, and difficulty-labeled issue. | |
| if: > | |
| github.event.action == 'assigned' && | |
| github.event.issue.state == 'open' && | |
| github.event.issue.locked == false && | |
| contains(github.event.issue.labels.*.name, 'approved') && | |
| ( | |
| contains(github.event.issue.labels.*.name, 'skill: beginner') || | |
| contains(github.event.issue.labels.*.name, 'skill: intermediate') || | |
| contains(github.event.issue.labels.*.name, 'skill: advanced') | |
| ) | |
| steps: | |
| - name: Harden the runner | |
| uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout repository | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 #v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - name: Trigger CodeRabbit Plan | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 #v9.0.0 | |
| with: | |
| script: | | |
| const script = require('./.github/scripts/coderabbit_plan_trigger.js'); | |
| await script({ github, context}); |