From 5102640bf7ba0a196e2b04bf86feca736fbef9b0 Mon Sep 17 00:00:00 2001 From: Marc Handalian Date: Mon, 11 Dec 2023 10:55:23 -0800 Subject: [PATCH 1/4] Convert issue and bug templates to use forms Signed-off-by: Marc Handalian --- .github/ISSUE_TEMPLATE/bug_template.md | 33 --------- .github/ISSUE_TEMPLATE/bug_template.yml | 86 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 19 ----- .github/ISSUE_TEMPLATE/feature_request.yml | 62 ++++++++++++++++ .github/workflows/triage.yml | 28 +++++++ 5 files changed, 176 insertions(+), 52 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_template.md create mode 100644 .github/ISSUE_TEMPLATE/bug_template.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/workflows/triage.yml diff --git a/.github/ISSUE_TEMPLATE/bug_template.md b/.github/ISSUE_TEMPLATE/bug_template.md deleted file mode 100644 index be3ae51b237ee..0000000000000 --- a/.github/ISSUE_TEMPLATE/bug_template.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: 🐛 Bug report -about: Create a report to help us improve -title: "[BUG]" -labels: 'bug, untriaged' -assignees: '' ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Plugins** -Please list all plugins currently enabled. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Host/Environment (please complete the following information):** - - OS: [e.g. iOS] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/bug_template.yml b/.github/ISSUE_TEMPLATE/bug_template.yml new file mode 100644 index 0000000000000..ba6b12f51f3dd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_template.yml @@ -0,0 +1,86 @@ +name: 🐛 Bug report +description: Create a report to help us improve +title: "[BUG] " +labels: ['bug, untriaged'] +body: + - type: textarea + attributes: + label: Describe the bug + description: A clear and concise description of what the bug is. + validations: + required: true + - type: dropdown + attributes: + label: Related component + description: Choose a specific OpenSearch component your bug belongs to. If you are unsure which to select or if the component is not present, select "Other". + multiple: false + options: + - Other + - Build + - Clients + - Cluster Manager + - Extensions + - Indexing:Performance + - Indexing:Replication + - Indexing + - Libraries + - Plugins + - Search:Aggregations + - Search:Performance + - Search:Query Capabilities + - Search:Query Insights + - Search:Relevance + - Search:Remote Search + - Search:Resiliency + - Search:Searchable Snapshots + - Search + - Storage:Durability + - Storage:Performance + - Storage:Remote + - Storage:Snapshots + - Storage + validations: + required: true + - type: textarea + attributes: + label: To Reproduce + description: Steps to reproduce the behavior. + value: | + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: true + - type: textarea + attributes: + label: Expected behavior + description: A clear and concise description of what you expected to happen. + validations: + required: true + - type: textarea + attributes: + label: Documents, Screenshots + description: If applicable, please attach more information in this area, like log files or screenshoots, to help debug your problem. + validations: + required: false + - type: textarea + attributes: + label: Host/Environment + value: | + - OS: [e.g. iOS] + - Version [e.g. 22] + validations: + required: false + - type: textarea + attributes: + label: Plugins + description: Please list all plugins currently enabled. + validations: + required: false + - type: textarea + attributes: + label: Additional context + description: Add any other context about the problem here. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 53b3614a34342..0000000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: 🎆 Feature request -about: Suggest an idea for this project -title: '' -labels: 'enhancement, untriaged' -assignees: '' ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000000000..d93ac8b590706 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,62 @@ +name: 🎆 Feature request +description: Suggest an idea for this project +title: '[Feature Request] <title>' +labels: ['enhancement, untriaged'] +body: + - type: textarea + attributes: + label: Is your feature request related to a problem? Please describe + description: A clear and concise description of what the problem is. + placeholder: Ex. I'm always frustrated when [...] + validations: + required: true + - type: textarea + attributes: + label: Describe the solution you'd like + description: A clear and concise description of what you want to happen. + validations: + required: true + - type: dropdown + attributes: + label: Related component + description: Choose a specific OpenSearch component your feature request belongs to. If you are unsure of which component to select or if the component is not present, select "Other". + multiple: false + options: + - Other + - Build + - Clients + - Cluster Manager + - Extensions + - Indexing:Performance + - Indexing:Replication + - Indexing + - Libraries + - Plugins + - Search:Aggregations + - Search:Performance + - Search:Query Capabilities + - Search:Query Insights + - Search:Relevance + - Search:Remote Search + - Search:Resiliency + - Search:Searchable Snapshots + - Search + - Storage:Durability + - Storage:Performance + - Storage:Remote + - Storage:Snapshots + - Storage + validations: + required: true + - type: textarea + attributes: + label: Describe alternatives you've considered + description: A clear and concise description of any alternative solutions or features you've considered. + validations: + required: false + - type: textarea + attributes: + label: Additional context + description: Add any other context or screenshots about the feature request here. + validations: + required: false diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml new file mode 100644 index 0000000000000..be1dede36cf58 --- /dev/null +++ b/.github/workflows/triage.yml @@ -0,0 +1,28 @@ +name: Auto triage based on the component label in issue + +on: + issues: + types: [opened] + +jobs: + apply-label: + if: github.repository == 'opensearch-project/OpenSearch' + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v7 + with: + script: | + const { issue, repository } = context.payload; + const { number, body } = issue; + const { owner, name } = repository; + const regex = /###\sRelated\scomponent\n\n(\w*)\n/gm; + let match; + while ( ( match = regex.exec( body ) ) ) { + const [ , component_label ] = match; + await github.rest.issues.addLabels( { + owner: owner.login, + repo: name, + issue_number: number, + labels: [ `${ component_label }` ], + } ); + } From e4a1e032a3b160282811691de8e5a4f8fe0334f6 Mon Sep 17 00:00:00 2001 From: Marc Handalian <marc.handalian@gmail.com> Date: Mon, 11 Dec 2023 14:01:34 -0800 Subject: [PATCH 2/4] Consolidate add-untriaged into triage workflow Signed-off-by: Marc Handalian <marc.handalian@gmail.com> --- .github/workflows/add-untriaged.yml | 20 -------------------- .github/workflows/triage.yml | 10 ++++++++-- 2 files changed, 8 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/add-untriaged.yml diff --git a/.github/workflows/add-untriaged.yml b/.github/workflows/add-untriaged.yml deleted file mode 100644 index 38de96f663051..0000000000000 --- a/.github/workflows/add-untriaged.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Apply 'untriaged' label during issue lifecycle - -on: - issues: - types: [opened, reopened, transferred] - -jobs: - apply-label: - if: github.repository == 'opensearch-project/OpenSearch' - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v7 - with: - script: | - github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ['untriaged'] - }) diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index be1dede36cf58..fe2cd6e0b9a51 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -2,11 +2,11 @@ name: Auto triage based on the component label in issue on: issues: - types: [opened] + types: [opened, reopened, transferred] jobs: apply-label: - if: github.repository == 'opensearch-project/OpenSearch' + if: github.repository == 'mch2/OpenSearch' runs-on: ubuntu-latest steps: - uses: actions/github-script@v7 @@ -26,3 +26,9 @@ jobs: labels: [ `${ component_label }` ], } ); } + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['untriaged'] + }) From 821ad931d99d9ae5b95fc4a05272886781569ecb Mon Sep 17 00:00:00 2001 From: Marc Handalian <marc.handalian@gmail.com> Date: Mon, 11 Dec 2023 14:09:58 -0800 Subject: [PATCH 3/4] consolidate optional text areas in bug template Signed-off-by: Marc Handalian <marc.handalian@gmail.com> --- .github/ISSUE_TEMPLATE/bug_template.yml | 35 ++++++++++--------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_template.yml b/.github/ISSUE_TEMPLATE/bug_template.yml index ba6b12f51f3dd..2cd1ee8a7e688 100644 --- a/.github/ISSUE_TEMPLATE/bug_template.yml +++ b/.github/ISSUE_TEMPLATE/bug_template.yml @@ -60,27 +60,20 @@ body: required: true - type: textarea attributes: - label: Documents, Screenshots - description: If applicable, please attach more information in this area, like log files or screenshoots, to help debug your problem. - validations: - required: false - - type: textarea - attributes: - label: Host/Environment - value: | - - OS: [e.g. iOS] - - Version [e.g. 22] - validations: - required: false - - type: textarea - attributes: - label: Plugins - description: Please list all plugins currently enabled. - validations: - required: false - - type: textarea - attributes: - label: Additional context + label: Additional Details description: Add any other context about the problem here. + value: | + **Plugins** + Please list all plugins currently enabled. + + **Screenshots** + If applicable, add screenshots to help explain your problem. + + **Host/Environment (please complete the following information):** + - OS: [e.g. iOS] + - Version [e.g. 22] + + **Additional context** + Add any other context about the problem here. validations: required: false From ac8eab698db9afed2abb7d8e56b9200de32ebd4b Mon Sep 17 00:00:00 2001 From: Marc Handalian <marc.handalian@gmail.com> Date: Mon, 11 Dec 2023 14:19:59 -0800 Subject: [PATCH 4/4] swap repository back to opensearch-project Signed-off-by: Marc Handalian <marc.handalian@gmail.com> --- .github/workflows/triage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index fe2cd6e0b9a51..4a4a5eda628d2 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -6,7 +6,7 @@ on: jobs: apply-label: - if: github.repository == 'mch2/OpenSearch' + if: github.repository == 'opensearch-project/OpenSearch' runs-on: ubuntu-latest steps: - uses: actions/github-script@v7