Skip to content

Commit 5abaf8c

Browse files
authored
added dropdown in OS field of the bug-report issue form and github workflow to auto lable (#11880)
1 parent 0243844 commit 5abaf8c

File tree

2 files changed

+58
-2
lines changed

2 files changed

+58
-2
lines changed

.github/ISSUE_TEMPLATE/bug-report.yaml

+26-2
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,35 @@ body:
3636
attributes:
3737
value: '### Environment'
3838

39-
- type: textarea
39+
- type: dropdown
4040
id: os
4141
attributes:
4242
label: OS
43-
placeholder: 'printf "$(uname -srm)\n$(cat /etc/os-release)\n"'
43+
options:
44+
- 'RHEL 9'
45+
- 'RHEL 8'
46+
- 'Fedora 40'
47+
- 'Ubuntu 24'
48+
- 'Ubuntu 22'
49+
- 'Ubuntu 20'
50+
- 'Debian 12'
51+
- 'Debian 11'
52+
- 'Flatcar Container Linux'
53+
- 'openSUSE Leap'
54+
- 'openSUSE Tumbleweed'
55+
- 'Oracle Linux 9'
56+
- 'Oracle Linux 8'
57+
- 'AlmaLinux 9'
58+
- 'AlmaLinux 8'
59+
- 'Rocky Linux 9'
60+
- 'Rocky Linux 8'
61+
- 'Amazon Linux 2'
62+
- 'Kylin Linux Advanced Server V10'
63+
- 'UOS Linux 20'
64+
- 'openEuler 24'
65+
- 'openEuler 22'
66+
- 'openEuler 20'
67+
- 'Other|Unsupported'
4468
validations:
4569
required: true
4670

.github/workflows/auto-label-os.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Issue labeler
2+
on:
3+
issues:
4+
types: [opened]
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
label-component:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Parse issue form
19+
uses: stefanbuck/github-issue-parser@v3
20+
id: issue-parser
21+
with:
22+
template-path: .github/ISSUE_TEMPLATE/bug-report.yaml
23+
24+
- name: Set labels based on OS field
25+
uses: redhat-plumbers-in-action/advanced-issue-labeler@v2
26+
with:
27+
issue-form: ${{ steps.issue-parser.outputs.jsonString }}
28+
section: os
29+
block-list: |
30+
None
31+
Other
32+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)