Skip to content

Commit 3c32515

Browse files
mch2rayshrey
authored andcommitted
Convert issue and bug templates to use forms (opensearch-project#11534)
Signed-off-by: Marc Handalian <marc.handalian@gmail.com> Signed-off-by: Marc Handalian <handalm@amazon.com>
1 parent e8b6544 commit 3c32515

File tree

6 files changed

+175
-72
lines changed

6 files changed

+175
-72
lines changed

.github/ISSUE_TEMPLATE/bug_template.md

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: 🐛 Bug report
2+
description: Create a report to help us improve
3+
title: "[BUG] <title>"
4+
labels: ['bug, untriaged']
5+
body:
6+
- type: textarea
7+
attributes:
8+
label: Describe the bug
9+
description: A clear and concise description of what the bug is.
10+
validations:
11+
required: true
12+
- type: dropdown
13+
attributes:
14+
label: Related component
15+
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".
16+
multiple: false
17+
options:
18+
- Other
19+
- Build
20+
- Clients
21+
- Cluster Manager
22+
- Extensions
23+
- Indexing:Performance
24+
- Indexing:Replication
25+
- Indexing
26+
- Libraries
27+
- Plugins
28+
- Search:Aggregations
29+
- Search:Performance
30+
- Search:Query Capabilities
31+
- Search:Query Insights
32+
- Search:Relevance
33+
- Search:Remote Search
34+
- Search:Resiliency
35+
- Search:Searchable Snapshots
36+
- Search
37+
- Storage:Durability
38+
- Storage:Performance
39+
- Storage:Remote
40+
- Storage:Snapshots
41+
- Storage
42+
validations:
43+
required: true
44+
- type: textarea
45+
attributes:
46+
label: To Reproduce
47+
description: Steps to reproduce the behavior.
48+
value: |
49+
1. Go to '...'
50+
2. Click on '....'
51+
3. Scroll down to '....'
52+
4. See error
53+
validations:
54+
required: true
55+
- type: textarea
56+
attributes:
57+
label: Expected behavior
58+
description: A clear and concise description of what you expected to happen.
59+
validations:
60+
required: true
61+
- type: textarea
62+
attributes:
63+
label: Additional Details
64+
description: Add any other context about the problem here.
65+
value: |
66+
**Plugins**
67+
Please list all plugins currently enabled.
68+
69+
**Screenshots**
70+
If applicable, add screenshots to help explain your problem.
71+
72+
**Host/Environment (please complete the following information):**
73+
- OS: [e.g. iOS]
74+
- Version [e.g. 22]
75+
76+
**Additional context**
77+
Add any other context about the problem here.
78+
validations:
79+
required: false

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: 🎆 Feature request
2+
description: Suggest an idea for this project
3+
title: '[Feature Request] <title>'
4+
labels: ['enhancement, untriaged']
5+
body:
6+
- type: textarea
7+
attributes:
8+
label: Is your feature request related to a problem? Please describe
9+
description: A clear and concise description of what the problem is.
10+
placeholder: Ex. I'm always frustrated when [...]
11+
validations:
12+
required: true
13+
- type: textarea
14+
attributes:
15+
label: Describe the solution you'd like
16+
description: A clear and concise description of what you want to happen.
17+
validations:
18+
required: true
19+
- type: dropdown
20+
attributes:
21+
label: Related component
22+
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".
23+
multiple: false
24+
options:
25+
- Other
26+
- Build
27+
- Clients
28+
- Cluster Manager
29+
- Extensions
30+
- Indexing:Performance
31+
- Indexing:Replication
32+
- Indexing
33+
- Libraries
34+
- Plugins
35+
- Search:Aggregations
36+
- Search:Performance
37+
- Search:Query Capabilities
38+
- Search:Query Insights
39+
- Search:Relevance
40+
- Search:Remote Search
41+
- Search:Resiliency
42+
- Search:Searchable Snapshots
43+
- Search
44+
- Storage:Durability
45+
- Storage:Performance
46+
- Storage:Remote
47+
- Storage:Snapshots
48+
- Storage
49+
validations:
50+
required: true
51+
- type: textarea
52+
attributes:
53+
label: Describe alternatives you've considered
54+
description: A clear and concise description of any alternative solutions or features you've considered.
55+
validations:
56+
required: false
57+
- type: textarea
58+
attributes:
59+
label: Additional context
60+
description: Add any other context or screenshots about the feature request here.
61+
validations:
62+
required: false

.github/workflows/add-untriaged.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/triage.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Auto triage based on the component label in issue
2+
3+
on:
4+
issues:
5+
types: [opened, reopened, transferred]
6+
7+
jobs:
8+
apply-label:
9+
if: github.repository == 'opensearch-project/OpenSearch'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/github-script@v7
13+
with:
14+
script: |
15+
const { issue, repository } = context.payload;
16+
const { number, body } = issue;
17+
const { owner, name } = repository;
18+
const regex = /###\sRelated\scomponent\n\n(\w*)\n/gm;
19+
let match;
20+
while ( ( match = regex.exec( body ) ) ) {
21+
const [ , component_label ] = match;
22+
await github.rest.issues.addLabels( {
23+
owner: owner.login,
24+
repo: name,
25+
issue_number: number,
26+
labels: [ `${ component_label }` ],
27+
} );
28+
}
29+
github.rest.issues.addLabels({
30+
issue_number: context.issue.number,
31+
owner: context.repo.owner,
32+
repo: context.repo.repo,
33+
labels: ['untriaged']
34+
})

0 commit comments

Comments
 (0)