1919 const issue = context.payload.issue || context.payload.pull_request;
2020 if (!issue) return;
2121 const title = typeof issue.title === "string" ? issue.title : "";
22+ const lowerTitle = title.toLowerCase();
2223
2324 const labelsToAdd = [];
2425
@@ -28,15 +29,40 @@ jobs:
2829 }
2930
3031 // Auto-label issues that include "question"
31- if (title.toLowerCase() .includes("question")) {
32+ if (lowerTitle .includes("question")) {
3233 labelsToAdd.push("question");
3334 }
3435
3536 // Auto-label issues that include "bug"
36- if (title.toLowerCase() .includes("bug")) {
37+ if (lowerTitle .includes("bug")) {
3738 labelsToAdd.push("bug");
3839 }
3940
41+ // Auto-label issues that include "enhancement" or "feature"
42+ if (lowerTitle.includes("enhancement") || lowerTitle.includes("feature")) {
43+ labelsToAdd.push("enhancement");
44+ }
45+
46+ // Auto-label issues that include "documentation" or "docs"
47+ if (lowerTitle.includes("documentation") || lowerTitle.includes("docs")) {
48+ labelsToAdd.push("documentation");
49+ }
50+
51+ // Auto-label issues that include "help"
52+ if (lowerTitle.includes("help")) {
53+ labelsToAdd.push("help wanted");
54+ }
55+
56+ // Auto-label issues that include "beginner" or "good first"
57+ if (lowerTitle.includes("beginner") || lowerTitle.includes("good first")) {
58+ labelsToAdd.push("good first issue");
59+ }
60+
61+ // Auto-label issues that include "feedback" or "suggest"
62+ if (lowerTitle.includes("feedback") || lowerTitle.includes("suggest")) {
63+ labelsToAdd.push("feedback");
64+ }
65+
4066 if (labelsToAdd.length > 0) {
4167 await github.rest.issues.addLabels({
4268 owner: context.repo.owner,
0 commit comments