← Back to issue list

Add workflow to auto-close mistake issues

View original Github issue

Metadata

Project
snapcraft
Number
#5916
Type
pull request
State
open
Author
Copilot
Labels
Created
2025-12-08 21:23:10+00:00
Updated
2025-12-08 21:44:35+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

Users occasionally open issues by mistake, such as issues with just a URL in the title (e.g., `https://github.com/FortAwesome/Font-Awesome.git`) or issues with placeholder text that wasn't filled out (e.g., "TYPE YOUR QUESTION HERE"). ## Changes Added `.github/workflows/close-mistake-issues.yaml` that: - Triggers on issue open events - Detects mistake patterns: - Title is a standalone URL - Title contains `.git` with body < 20 chars - Title contains placeholder text (like "TYPE YOUR QUESTION HERE", "TYPE YOUR ISSUE HERE", etc.) with unfilled template body - Auto-closes detected issues with comment: "Appears to have been opened by mistake." Uses `actions/github-script@v7` with minimal `issues: write` permission. --- - [ ] I've followed the [contribution guidelines](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md). - [ ] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/). - [ ] I've successfully run `make lint && make test`. - [ ] I've added or updated any relevant documentation. - [ ] I've updated the relevant release notes. <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>https://github.com/FortAwesome/Font-Awesome.git</issue_title> > <issue_description></issue_description> > > <agent_instructions>Create a workflow that runs when issues get opened and determines whether they are these sorts of mistake issues. If they are, the workflow should close the issue with a comment "Appears to have been opened by mistake."</agent_instructions> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > <comment_new><author>@bepri</author><body> > Appears to have been opened by mistake.</body></comment_new> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes canonical/snapcraft#5914 <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/canonical/snapcraft/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.

Evaluation history

No evaluation history available.