-
Notifications
You must be signed in to change notification settings - Fork 97
48 lines (43 loc) · 1.41 KB
/
add-workspace-label.yml
File metadata and controls
48 lines (43 loc) · 1.41 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
# PR and issue workspace path labels (workspace/<dir>) for search and triage.
# Based on: https://github.com/backstage/community-plugins/blob/main/.github/workflows/add-workspace-label.yml
name: Add workspace labels to PRs
on:
issues:
types: [opened, edited]
pull_request_target:
types:
- opened
- synchronize
- reopened
jobs:
triage-issues:
if: github.event_name == 'issues'
runs-on: ubuntu-latest
permissions:
issues: write
contents: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 #v3.4
with:
configuration-path: .github/labeler.yml
enable-versioned-regex: 0
repo-token: ${{ secrets.GITHUB_TOKEN }}
label-prs:
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
with:
configuration-path: .github/pr-labeler.yml
repo-token: ${{ secrets.GITHUB_TOKEN }}