Skip to content

Add created badge for README.md #86

Add created badge for README.md

Add created badge for README.md #86

Workflow file for this run

name: "Auto Label Issues"
on:
issues:
types:
- edited
- opened
jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Apply Labels to Issues
uses: actions/[email protected]
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
});
}