Skip to content

Commit

Permalink
ci: label issue with version (#17484)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

(cherry picked from commit 3a01abb)
  • Loading branch information
Borda committed Jun 1, 2023
1 parent 7928a1d commit 6953ae6
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/1_bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ body:
validations:
required: true

- type: dropdown
id: versions
attributes:
label: What version are you seeing the problem on?
id: versions
description: select all version where you have experienced this issue
multiple: true
options:
- "ver: 1.6.x"
- "ver: 1.7.x"
- "ver: 1.8.x"
- "ver: 1.9.x"
- "ver: 2.0.x"
- "ver: master"

- type: markdown
attributes:
value: "**Note: The rest of this form is optional, but filling it out may help us to provide better support.**"
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/labeler-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Label Issue
on:
issues:
types: [opened, edited]

permissions:
contents: read

jobs:
label-component:
runs-on: ubuntu-latest

permissions:
# required for all workflows
issues: write

# only required for workflows in private repositories
actions: read
contents: read

steps:
- uses: actions/checkout@v3

- name: Parse issue form
uses: stefanbuck/github-issue-parser@v3
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/1_bug_report.yaml

- name: Set labels based on severity field
uses: redhat-plumbers-in-action/advanced-issue-labeler@v2
with:
issue-form: ${{ steps.issue-parser.outputs.jsonString }}
section: versions
token: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Label Pull Requests
on:
- pull_request_target
on: [pull_request_target]

jobs:
triage:
Expand All @@ -12,3 +11,4 @@ jobs:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml

0 comments on commit 6953ae6

Please sign in to comment.