From bf767bdffe076673c4daea96d221b9dc582e2e7f Mon Sep 17 00:00:00 2001 From: Rafael Padilha Date: Fri, 26 Jan 2024 17:29:32 +0000 Subject: [PATCH] forms and automatic labeler action --- .github/ISSUE_TEMPLATE/bug.yml | 16 +++++++------ .github/ISSUE_TEMPLATE/question.yml | 14 ++++++++++++ .github/advanced-issue-labeler.yml | 35 +++++++++++++++++++++++++++++ .github/workflows/issue-labeler.yml | 34 ++++++++++++++++++++++++++++ 4 files changed, 92 insertions(+), 7 deletions(-) create mode 100644 .github/advanced-issue-labeler.yml create mode 100644 .github/workflows/issue-labeler.yml diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 023c4010..71766f1b 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -10,11 +10,12 @@ body: - type: dropdown id: bug-location attributes: - label: Where did you encounter the bug? + label: In which step did you encounter the bug? options: - FarmVibes.AI setup - Workflow execution - Notebook execution + - Documentation - Other validations: required: true @@ -22,12 +23,12 @@ body: - type: dropdown id: cluster-type attributes: - label: Are you using a local or remote (AKS) FarmVibes.AI cluster? + label: Are you using a local or a remote (AKS) FarmVibes.AI cluster? options: - Local cluster - Remote (ASK) cluster validations: - required: true + required: false - type: textarea @@ -36,9 +37,10 @@ body: label: Bug description description: | Please describe the bug you encountered in as much detail as possible. - If you are encountering an error, please include the full error message. + If you are encountering an error, please include the full error message, + log file content, or the `run.reason` field if the error occurred during workflow execution. validations: - required: true + required: false - type: textarea id: steps-to-reproduce @@ -46,8 +48,8 @@ body: label: Steps to reproduce the problem description: | Please describe the steps you took to reproduce the bug. If the issue was encountered - during a workflow or notebook execution, please include the workflow name, parameters, - input geometry and time range. + during workflow or notebook execution, please include the workflow/notebook name, + parameters, input geometry and time range. validations: required: false diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml index 909b5f9c..772fa56b 100644 --- a/.github/ISSUE_TEMPLATE/question.yml +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -7,6 +7,20 @@ body: attributes: value: Thanks for taking the time to reach us! Feel free to ask any question related to FarmVibes.AI, we will get back to you as soon as possible. + - type: dropdown + id: info-location + attributes: + label: Topic + options: + - General question + - Feature request + - Documentation + - FarmVibes.AI setup + - Notebook + - Workflow + validations: + required: false + - type: textarea id: info-request attributes: diff --git a/.github/advanced-issue-labeler.yml b/.github/advanced-issue-labeler.yml new file mode 100644 index 00000000..ff434547 --- /dev/null +++ b/.github/advanced-issue-labeler.yml @@ -0,0 +1,35 @@ +policy: + - template: ['bug.yml', 'question.yml'] + - section: + - id: [bug-location] + block-list: ['Other'] + label: + - name: 'documentation' + keys: ['Documentation'] + - name: 'FarmVibes.AI setup' + keys: ['FarmVibes.AI setup'] + - name: 'notebooks' + keys: ['Notebook execution'] + - name: 'workflows' + keys: ['Workflow execution'] + - section: + - id: [cluster-type] + label: + - name: 'local cluster' + keys: ['Local cluster'] + - name: 'remote cluster' + keys: ['Remote (ASK) cluster'] + - section: + - id: [info-location] + block-list: ['General question'] + label: + - name: 'enhancement' + keys: ['Feature request'] + - name: 'documentation' + keys: ['Documentation'] + - name: 'FarmVibes.AI setup' + keys: ['FarmVibes.AI setup'] + - name: 'notebooks' + keys: ['Notebook'] + - name: 'workflows' + keys: ['Workflow'] \ No newline at end of file diff --git a/.github/workflows/issue-labeler.yml b/.github/workflows/issue-labeler.yml new file mode 100644 index 00000000..34be0510 --- /dev/null +++ b/.github/workflows/issue-labeler.yml @@ -0,0 +1,34 @@ +name: Issue labeler +on: + issues: + types: [ opened ] + +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/bug.yml + + - name: Set labels based bug type + uses: redhat-plumbers-in-action/advanced-issue-labeler@v2 + with: + issue-form: ${{ steps.issue-parser.outputs.jsonString }} + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file