From 76fd4f674b601e0e25be42df4f76fa39927b629b Mon Sep 17 00:00:00 2001 From: Renato Foot Date: Tue, 12 Apr 2022 18:40:55 +0000 Subject: [PATCH] Add issue auto label Signed-off-by: Renato Foot --- .github/ISSUE_TEMPLATE/bug.yaml | 6 +-- .github/ISSUE_TEMPLATE/enhancement.yaml | 38 ------------------- .../{content.yaml => request.yaml} | 20 +++++++--- .github/workflows/issue.yml | 25 ++++++++++++ 4 files changed, 43 insertions(+), 46 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/enhancement.yaml rename .github/ISSUE_TEMPLATE/{content.yaml => request.yaml} (77%) create mode 100644 .github/workflows/issue.yml diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml index 46e7cd64682..8182c578021 100644 --- a/.github/ISSUE_TEMPLATE/bug.yaml +++ b/.github/ISSUE_TEMPLATE/bug.yaml @@ -1,6 +1,6 @@ name: Report a problem/bug description: Any issues that you have found while using the server -labels: ["Status: Pending Test", "Type: Bug"] +labels: ["Type: Bug"] body: - type: markdown attributes: @@ -27,9 +27,9 @@ body: description: Where is the problem? options: - label: Datapack - - label: Docker - - label: Map - label: Source + - label: Map + - label: Other validations: required: true diff --git a/.github/ISSUE_TEMPLATE/enhancement.yaml b/.github/ISSUE_TEMPLATE/enhancement.yaml deleted file mode 100644 index c02325001fa..00000000000 --- a/.github/ISSUE_TEMPLATE/enhancement.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: Report a enhancement -description: Any thing that is missing -labels: ["Status: Pending Test", "Type: Enhancement"] -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this issue! - - - type: checkboxes - id: area - attributes: - label: Area - description: Where is the problem? - options: - - label: Datapack - - label: Docker - - label: Map - - label: Source - validations: - required: true - - - type: textarea - id: enhancement - attributes: - label: Describe the enhancement - description: What should be improved? Attach screenshots, logs, etc, anything that can helps us - validations: - required: true - - - type: checkboxes - id: terms - attributes: - label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/opentibiabr/canary/blob/main/CODE_OF_CONDUCT.md) - options: - - label: I agree to follow this project's Code of Conduct - required: true diff --git a/.github/ISSUE_TEMPLATE/content.yaml b/.github/ISSUE_TEMPLATE/request.yaml similarity index 77% rename from .github/ISSUE_TEMPLATE/content.yaml rename to .github/ISSUE_TEMPLATE/request.yaml index fbad20ca0ae..10efb698c36 100644 --- a/.github/ISSUE_TEMPLATE/content.yaml +++ b/.github/ISSUE_TEMPLATE/request.yaml @@ -1,12 +1,22 @@ -name: Report a missing content -description: Any thing that is missing -labels: ["Status: Pending Test", "Type: Missing Content"] +name: Request +description: Any request body: - type: markdown attributes: value: | Thanks for taking the time to fill out this issue! + - type: dropdown + id: priority + attributes: + label: Priority + description: How critical is this? + options: + - Missing Content + - Enhancement + validations: + required: true + - type: checkboxes id: area attributes: @@ -14,9 +24,9 @@ body: description: Where is the problem? options: - label: Datapack - - label: Docker - - label: Map - label: Source + - label: Map + - label: Other validations: required: true diff --git a/.github/workflows/issue.yml b/.github/workflows/issue.yml new file mode 100644 index 00000000000..9486cf44731 --- /dev/null +++ b/.github/workflows/issue.yml @@ -0,0 +1,25 @@ +name: Issue - Labeling +on: + workflow_dispatch: + issues: + types: ['opened'] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: Renato66/auto-label@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + ignore-comments: true + labels-synonyms: '{ + "Priority: Low":["Low"], + "Priority: Medium":["Medium"], + "Priority: High":["High"], + "Priority: Critical":["Critical"], + "Area: Datapack":["[X] Datapack"], + "Area: Source":["[X] Source"], + "Area: Map":["[X] Map"], + "Type: Enhancement":["Enhancement"], + "Type: Missing Content":["Missing Content"] + }' + default-labels: '["Status: Pending Test"]'