forked from hiero-ledger/hiero-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot-coderabbit-plan-trigger.yml
More file actions
48 lines (43 loc) · 1.6 KB
/
Copy pathbot-coderabbit-plan-trigger.yml
File metadata and controls
48 lines (43 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# 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});