Skip to content
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
9 changes: 6 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
bug_report.md
---

name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
labels: ['bug']
assignees: ''

---

**Describe the bug**
Expand All @@ -22,7 +23,9 @@ Steps to reproduce the behavior:
A clear and concise description of what you expected to happen.

**Are you going to work on fixing this?**
No.

- [ ] Yes
- [x] No

**Screenshots**
If applicable, add screenshots to help explain your problem.
Expand Down
8 changes: 6 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
labels: ['enhancement']
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand All @@ -16,5 +15,10 @@ 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.

**Are you going to work on implementing this?**

- [ ] Yes
- [x] No

**Additional context**
Add any other context or screenshots about the feature request here.
37 changes: 37 additions & 0 deletions .github/workflows/label-issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Auto Label Issues"
on:
issues:
types:
- edited
- opened

jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Apply Labels to Issues
uses: actions/github-script@v7.0.1
with:
script: |
const issue = context.payload.issue;
const keywords = {
"bug": ["error", "failure", "not working"],
"enhancement": ["add", "feature request", "improve"],
"question": ["clarification", "help", "how to"]
};

let labels = [];
for (const [label, words] of Object.entries(keywords)) {
if (words.some(word => issue.title.toLowerCase().includes(word) || issue.body.toLowerCase().includes(word))) {
labels.push(label);
}
}

if (labels.length > 0) {
github.rest.issues.addLabels({
issue_number: context.issue.number,
labels: labels,
owner: context.repo.owner,
repo: context.repo.repo
});
}