Skip to content

Commit bbdbb60

Browse files
keertkcopybara-github
authored andcommitted
Auto-add team-X labels to issues opened through the bug / FR template + some clean up
PiperOrigin-RevId: 603410096 Change-Id: I74a6a8403cfd79f52bf434e81cdc1d364af6a505
1 parent 6cf19c7 commit bbdbb60

File tree

5 files changed

+98
-24
lines changed

5 files changed

+98
-24
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@ body:
2222
- type: dropdown
2323
id: subteam
2424
attributes:
25-
label: >
26-
Which category does this issue belong to?
27-
description: >
28-
Answering this will help us triage this issue faster and more accurately to the
29-
relevant team(s).
25+
label: Which category does this issue belong to?
26+
description: Help us triage this issue faster and more accurately to the relevant team(s).
3027
multiple: true
3128
options:
3229
- Android
33-
- C++/Objective-C Rules
30+
- C++ Rules
31+
- Objective-C Rules
3432
- CLI
3533
- Configurability
3634
- Core

.github/ISSUE_TEMPLATE/cherry_pick_request.yml

+10-12
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,23 @@ body:
2525
Which category does this issue belong to? Please select the corresponding label(s).
2626
multiple: true
2727
options:
28-
- team-CLI
29-
- team-OSS
30-
- team-Core
31-
- team-Bazel
3228
- team-Android
33-
- z-team-Apple
34-
- team-Rules-API
3529
- team-Rules-CPP
36-
- team-Local-Exec
37-
- team-Rules-Java
3830
- team-Rules-ObjC
31+
- team-CLI
32+
- team-Configurability
33+
- team-Core
34+
- team-Documentation
35+
- team-ExternalDeps
36+
- team-Rules-Java
3937
- team-Loading-API
38+
- team-Local-Exec
39+
- team-OSS
4040
- team-Performance
41-
- team-Remote-Exec
42-
- team-ExternalDeps
4341
- team-Rules-Python
42+
- team-Remote-Exec
43+
- team-Rules-API
4444
- team-Rules-Server
45-
- team-Documentation
46-
- team-Configurability
4745
- team-Starlark-Integration
4846
- team-Starlark-Interpreter
4947
- type: textarea

.github/ISSUE_TEMPLATE/feature_request.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@ body:
2222
- type: dropdown
2323
id: subteam
2424
attributes:
25-
label: >
26-
Which category does this issue belong to?
27-
description: >
28-
Answering this will help us triage this issue faster and more accurately to the
29-
relevant team(s).
25+
label: Which category does this issue belong to?
26+
description: Help us triage this issue faster and more accurately to the relevant team(s).
3027
multiple: true
3128
options:
3229
- Android
33-
- C++/Objective-C Rules
30+
- C++ Rules
31+
- Objective-C Rules
3432
- CLI
3533
- Configurability
3634
- Core

.github/advanced-issue-labeler.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
3+
policy:
4+
- template: [bug_report.yml, feature_request.yml]
5+
section:
6+
- id: [subteam]
7+
label:
8+
- name: team-Android
9+
keys: ['Android']
10+
- name: team-Rules-CPP
11+
keys: ['C++ Rules']
12+
- name: team-Rules-ObjC
13+
keys: ['Objective-C Rules']
14+
- name: team-CLI
15+
keys: ['CLI']
16+
- name: team-Configurability
17+
keys: ['Configurability']
18+
- name: team-Core
19+
keys: ['Core']
20+
- name: team-Documentation
21+
keys: ['Documentation']
22+
- name: team-ExternalDeps
23+
keys: ['External Dependency']
24+
- name: team-Rules-Java
25+
keys: ['Java Rules']
26+
- name: team-Loading-API
27+
keys: ['Loading API']
28+
- name: team-Local-Exec
29+
keys: ['Local Execution']
30+
- name: team-Performance
31+
keys: ['Performance']
32+
- name: team-Rules-Python
33+
keys: ['Python Rules']
34+
- name: team-Remote-Exec
35+
keys: ['Remote Execution']
36+
- name: team-Rules-API
37+
keys: ['Rules API']
38+
- name: team-Rules-Server
39+
keys: ['Server-Side Rules']
40+
- name: team-Starlark-Integration
41+
keys: ['Starlark Integration']
42+
- name: team-Starlark-Interpreter
43+
keys: ['Starlark Interpreter']

.github/workflows/issue-labeler.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
3+
name: Issue labeler
4+
on:
5+
issues:
6+
types: [ opened ]
7+
8+
jobs:
9+
label-issues-policy:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
issues: write
14+
15+
strategy:
16+
matrix:
17+
template: [ bug_report.yml, feature_request.yml ]
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Harden Runner
22+
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
23+
with:
24+
egress-policy: audit
25+
26+
- name: Parse issue form
27+
uses: stefanbuck/github-issue-parser@c1a559d78bfb8dd05216dab9ffd2b91082ff5324 # v3.0.1
28+
id: issue-parser
29+
with:
30+
template-path: .github/ISSUE_TEMPLATE/${{ matrix.template }}
31+
32+
- name: Set labels based on policy
33+
uses: redhat-plumbers-in-action/advanced-issue-labeler@6ee6fddfd744ee26b977e6a0436916f256896971 # v2.0.3
34+
with:
35+
issue-form: ${{ steps.issue-parser.outputs.jsonString }}
36+
template: ${{ matrix.template }}
37+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)