diff --git a/.github/ISSUE_TEMPLATE/bug-report.yaml b/.github/ISSUE_TEMPLATE/bug-report.yaml index 7c308b001f6..4fe6b8b2c36 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/bug-report.yaml @@ -36,11 +36,35 @@ body: attributes: value: '### Environment' - - type: textarea + - type: dropdown id: os attributes: label: OS - placeholder: 'printf "$(uname -srm)\n$(cat /etc/os-release)\n"' + options: + - 'RHEL 9' + - 'RHEL 8' + - 'Fedora 40' + - 'Ubuntu 24' + - 'Ubuntu 22' + - 'Ubuntu 20' + - 'Debian 12' + - 'Debian 11' + - 'Flatcar Container Linux' + - 'openSUSE Leap' + - 'openSUSE Tumbleweed' + - 'Oracle Linux 9' + - 'Oracle Linux 8' + - 'AlmaLinux 9' + - 'AlmaLinux 8' + - 'Rocky Linux 9' + - 'Rocky Linux 8' + - 'Amazon Linux 2' + - 'Kylin Linux Advanced Server V10' + - 'UOS Linux 20' + - 'openEuler 24' + - 'openEuler 22' + - 'openEuler 20' + - 'Other|Unsupported' validations: required: true diff --git a/.github/workflows/auto-label-os.yml b/.github/workflows/auto-label-os.yml new file mode 100644 index 00000000000..86c8ee123f4 --- /dev/null +++ b/.github/workflows/auto-label-os.yml @@ -0,0 +1,32 @@ +name: Issue labeler +on: + issues: + types: [opened] + +permissions: + contents: read + +jobs: + label-component: + runs-on: ubuntu-latest + permissions: + issues: write + + steps: + - uses: actions/checkout@v3 + + - name: Parse issue form + uses: stefanbuck/github-issue-parser@v3 + id: issue-parser + with: + template-path: .github/ISSUE_TEMPLATE/bug-report.yaml + + - name: Set labels based on OS field + uses: redhat-plumbers-in-action/advanced-issue-labeler@v2 + with: + issue-form: ${{ steps.issue-parser.outputs.jsonString }} + section: os + block-list: | + None + Other + token: ${{ secrets.GITHUB_TOKEN }}