CodeRabbit Plan Trigger #7
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's plan feature when a difficulty label is added to an issue. | |
| # Only fires for skill: beginner/intermediate/advanced labels, preventing duplicate runs. | |
| name: CodeRabbit Plan Trigger | |
| on: | |
| issues: | |
| types: [labeled] | |
| permissions: | |
| issues: write | |
| contents: read | |
| jobs: | |
| coderabbit_plan_trigger: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: coderabbit-plan-${{ github.event.issue.number }} | |
| cancel-in-progress: false | |
| # Only run when the newly added label is a difficulty label (skill: beginner/intermediate/advanced) | |
| if: > | |
| github.event.action == 'labeled' && | |
| github.event.issue.state == 'open' && | |
| contains(fromJson('["skill: beginner","skill: intermediate","skill: advanced"]'), github.event.label.name) | |
| 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 | |
| - 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}); |