forked from hiero-ledger/hiero-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1.14 KB
/
Copy pathbot-p0-issues-notify-team.yml
File metadata and controls
37 lines (32 loc) · 1.14 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
# This workflow warns the team about priority: critical issues immediately when they are created.
name: P0 Issue Alert
on:
issues:
types:
- labeled
permissions:
issues: write
contents: read
jobs:
p0_notify_team:
runs-on: hl-sdk-py-lin-md
# Only run for issues labeled with 'priority: critical' (case-insensitive)
if: >
(github.event_name == 'issues' && (
(github.event.label.name == 'priority: critical' || github.event.label.name == 'Priority: Critical'))
)
steps:
- name: Harden the runner
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Notify team of P0 issues
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const script = require('./.github/scripts/bot-p0-issues-notify-team.js');
await script({ github, context });