Skip to content

Commit 61f4eac

Browse files
committed
added dropdown in OS field of the bug-report issue form and github workflow to auto lable
1 parent 1f186ed commit 61f4eac

File tree

2 files changed

+53
-2
lines changed

2 files changed

+53
-2
lines changed

.github/ISSUE_TEMPLATE/bug-report.yaml

+21-2
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,30 @@ 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+
- 'RedHat'
45+
- 'CentOS'
46+
- 'Fedora'
47+
- 'Ubuntu'
48+
- 'Debian'
49+
- 'Flatcar'
50+
- 'Flatcar Container Linux by Kinvolk'
51+
- 'Suse'
52+
- 'openSUSE Leap'
53+
- 'openSUSE Tumbleweed'
54+
- 'ClearLinux'
55+
- 'OracleLinux'
56+
- 'AlmaLinux'
57+
- 'Rocky'
58+
- 'Amazon'
59+
- 'Kylin Linux Advanced Server'
60+
- 'UnionTech'
61+
- 'UniontechOS'
62+
- 'openEuler'
4463
validations:
4564
required: true
4665

.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)