Automatically mark pull requests and issues as stale with GitHub Actions

Published: (December 1, 2025 at 09:44 PM EST)
1 min read
Source: Dev.to

Source: Dev.to

Oh no, stale things!

You don’t want old pull requests and issues to clog the backlog of your open‑source projects, no matter how big or small. I ran into this problem recently: people left partially completed PRs and drafts on my repo. While I appreciate the effort, I don’t want to keep an eye on items that will never be picked up again, nor remember to close them over time.

There has to be a better way!

There is! There’s a handy GitHub Action called stale that you can add to your repositories.

  1. In your repository, open the .github/ folder.
  2. Create a subfolder named workflows.
  3. Add the Action’s .yml file to that folder.

That’s it!

For more details on adding Actions, see the official documentation: Adding Actions.

If you’d like to see a concrete implementation, check out the example in my PocketCal app repository: stale.yml.

Back to Blog

Related posts

Read more »