Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

add feature request bad names as exclusion

jubnl059158d08790
diff --git a/.github/workflows/close-untitled-issues.yml b/.github/workflows/close-untitled-issues.yml
index 06abecb9c..0d7b74007 100644
--- a/.github/workflows/close-untitled-issues.yml
+++ b/.github/workflows/close-untitled-issues.yml
@@ -19,13 +19,22 @@ jobs:
script: |
const title = context.payload.issue.title.trim();
const badTitles = [
- "[bug]",
+ "[BUG]",
"bug report",
"bug",
"issue",
];
+
+ const featureRequestTitles = [
+ "feature request",
+ "[feature]",
+ "[feature request]",
+ "[enhancement]"
+ ]
- if (badTitles.includes(title.toLowerCase())) {
+ const titleLower = title.toLowerCase();
+
+ if (badTitles.includes(titleLower)) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
@@ -33,6 +42,21 @@ jobs:
body: "This issue was closed because no title was provided. Please re-open with a descriptive title that summarizes the problem."
});
+ await github.rest.issues.update({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.payload.issue.number,
+ state: "closed",
+ state_reason: "not_planned"
+ });
+ } else if (featureRequestTitles.some(t => titleLower.startsWith(t))) {
+ await github.rest.issues.createComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.payload.issue.number,
+ body: "Feature requests should be made in the [Discussions](https://github.com/mauriceboe/TREK/discussions/new?category=feature-requests) — not as issues. This issue has been closed."
+ });
+
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,