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.

auto close issue on empty/bad title

jubnl77393ff40bb9
diff --git a/.github/workflows/close-untitled-issues.yml b/.github/workflows/close-untitled-issues.yml
new file mode 100644
index 000000000..06abecb9c
--- /dev/null
+++ b/.github/workflows/close-untitled-issues.yml
@@ -0,0 +1,43 @@
+name: Close untitled issues
+
+on:
+ issues:
+ types: [opened]
+
+permissions:
+ issues: write
+
+jobs:
+ check-title:
+ runs-on: ubuntu-latest
+ permissions:
+ issues: write
+ steps:
+ - name: Close if title is empty or generic
+ uses: actions/github-script@v7
+ with:
+ script: |
+ const title = context.payload.issue.title.trim();
+ const badTitles = [
+ "[bug]",
+ "bug report",
+ "bug",
+ "issue",
+ ];
+
+ if (badTitles.includes(title.toLowerCase())) {
+ await github.rest.issues.createComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.payload.issue.number,
+ 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"
+ });
+ }