feat: auto-close issues that bypass the issue-form templates - #2560
Closed
rajarsheechatterjee wants to merge 1 commit into
Closed
rajarsheechatterjee wants to merge 1 commit into
rajarsheechatterjee wants to merge 1 commit into
Conversation
GitHub can't enforce required issue-form fields outside its own web picker, so an issue created via the API, a deep link, or a fallback (like lnreader-plugins#2559) lands with no labels at all, since every template applies its own label on creation. Detect that signal and auto-close such issues with a comment pointing back to the three templates. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TC7Bc3M6GdnEdLm8HU1f35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
blank_issues_enabled: falsein.github/ISSUE_TEMPLATE/config.ymlonly hides the "Open a blank issue" link on theissues/new/choosepicker page — GitHub doesn't offer any way to enforce required issue-form fields outside that page. An issue created via the API/CLI, or a deep link that falls back to a blank compose form (as happened with #2559), skips validation entirely.This adds a new workflow,
.github/workflows/enforce_issue_template.yml, that reacts to the one reliable, template-agnostic signal we do have: each of the three issue forms (report_issue.yml→Bug,request_feature.yml→Feature Request,request_plugin.yml→Plugin Request) applies its own label automatically at creation time. So an issue with zero labels atissues: openedreliably means it skipped every template.When that happens, the workflow:
invalidlabel exists (creates it if missing) and applies it.reason: not planned).Skips issues opened by bots (
github.event.issue.user.type != 'Bot') to avoid interfering with any future automation-created issues.