Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

roots/issue-closer-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub action to automatically close issues/PRs

Automatically close issues or pull requests whose body text does not match the specified regular expression pattern. This is useful to enforce usage of issue/PR templates.

Installation

To configure the action simply add the following lines to your .github/main.workflow workflow file:

name: Autocloser
on: [issues, pull_request]
jobs:
  autoclose:
    runs-on: ubuntu-latest
    steps:
    - name: Autoclose issues that did not follow issue template
      uses: roots/issue-closer@v1.1
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        issue-close-message: "@${issue.user.login} this issue was automatically closed because it did not follow the issue template"
        issue-pattern: ".*guidelines for Contributing.*"

Configuration

issue-close-message and pr-close-message are ES6-style template literals which will be evaluated with the issue or pull request webhook payload in context. The example above uses ${issue.user.login} to get the author of the issue.

issue-pattern and pr-pattern are strings which are compiled to JavaScript Regexps.

About

GitHub action to automatically close issues/PRs that don't match a regexp

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.