Is it possible to auto-respond to issues not following a template?

I want to enforce people by making them use the provided issue templates on the GitHub Repository. Disabling the option to create empty issues seems to not really reduce that issue, but seems to even increase it for some reason.

So I was now wondering if there’s a way like a GitHub Action or GitHub App/Bot, which would check issues for if they follow the template and if not, auto-close them with a reason like “We use issue-templates to gather as much information as possible, to help you. So please choose one of them and don’t create an empty issue.”

It would be such a nice way if the issue-templates could be more restricted (i.e. by using Placeholders to indicate text-areas to write) to prevent the deletion of the template’s content… But I also see how this would be quite restricting so a solution as mentioned above would be awesome to have, so please let me know if there is anything.

1 Like

Hi @andre601,

Thank you for being here! Upon reading your post, I immediately though of the logic behind As far as I know there isn’t anything out of the box in GitHub to close the issue and send a message when issue template is missing

There is a marketplace action that claims you can configure issue-close-message and closed-issues-label, which are, respectively, the message that is shown when closing the issue and the label added to the issue when it being closed. Maybe that is worth giving a try:

I did check the action you mentioned. However, from what I gathered does this one only check the issue title and if it follows a provided pattern/format and if not closes it automatically with an optional message.

This isn’t what I am looking for because I don’t want to force the people to use a specific title, since they might have a bad title, but a good issue body.

I have the exact same problem. As one of the developers of a pretty large open source project, we get a fair number of issues per day. We’ve tried all kinds of things to enforce a template, but nothing seems to work.

The only thing that the templates can do right now is add some text, but people seem to be unable to understand this. The amount of issues we get with just the title filled in and an empty template in the body is staggering (or variants thereof where the template is poorly filled in).

I would really want to get some kind of mandatory field options or at the very least some kind of validation. It would save a lot of time and frustration.