Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: label issues by template+confirm bug command #57072

Merged
merged 2 commits into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/comment-commands.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# https://github.com/rytswd/comvent
trigger: specific

# list of users allowed to use these commands, from labeling an issue in
# a specific way to mark as duplicate, closing issues, the sky is the limit
# TODO implement more commands, add more users
users:
active:
- casswedson
- Maleclypse
- Termineitor244
- Faalagorn
- Ilysen
- Aerin-of-the-Toast
- anoobindisguise
- PatrikLundell
- TheShadowFerret

keywords:
- name: confirm-bug
value: '^\/confirmed.*'
10 changes: 10 additions & 0 deletions .github/issue-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1

labels:
- label: "(S1 - Need Confirmation)"
matcher:
body: "(\\s|^)### Describe the bug\\s*(\n|$)"

- label: "<Suggestion / Discussion>"
matcher:
body: "(\\s|^)### Is your feature request related to a problem.*\\s*(\n|$)"
31 changes: 31 additions & 0 deletions .github/workflows/comment-commands.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Comment Commands"

on:
issue_comment:
types:
- created

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}

jobs:
confirm-bug:
name: Confirm bug - Comment command
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set-up Comvent
uses: rytswd/[email protected]
id: comvent
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-path: .github/comment-commands.yml

- if: steps.comvent.outputs.confirm-bug != ''
name: Handle confirmed command - Label
run: |
gh issue edit "$ISSUE_NUMBER" --remove-label "(S1 - Need Confirmation)"
gh issue edit "$ISSUE_NUMBER" --add-label "(S2 - Confirmed)"
17 changes: 17 additions & 0 deletions .github/workflows/issue-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Issue Labeler"

on:
issues:
types:
- opened

jobs:
uses:
name: triage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: fuxingloh/multi-labeler@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
config-path: '.github/issue-labels.yml'