snapcraft icon indicating copy to clipboard operation
snapcraft copied to clipboard

Add workflow to auto-close mistake issues

Open Copilot opened this issue 4 months ago • 2 comments

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.
  • [ ] I've signed the CLA.
  • [ ] I've successfully run make lint && make test.
  • [ ] I've added or updated any relevant documentation.
  • [ ] I've updated the relevant release notes.
Original prompt

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)

@bepri Appears to have been opened by mistake.
  • Fixes canonical/snapcraft#5914

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot avatar Dec 08 '25 21:12 Copilot

@copilot make it work with issues like this too: https://github.com/canonical/snapcraft/issues/5913

lengau avatar Dec 08 '25 21:12 lengau

@copilot make it work with issues like this too: https://github.com/canonical/snapcraft/issues/5913

Done! The workflow now detects issues like #5913 with placeholder text in the title (e.g., "TYPE YOUR QUESTION HERE") and unfilled template bodies. Commit: ab33404

Copilot avatar Dec 08 '25 21:12 Copilot