Skip to content

ci: Close pull requests that have been inactive for two months - #817

Merged
anakinj merged 1 commit into
jwt:mainfrom
anakinj:ci/stale-pull-requests
Nov 28, 2026
Merged

anakinj merged 1 commit into
jwt:mainfrom
anakinj:ci/stale-pull-requests

Conversation

@anakinj

@anakinj anakinj commented Nov 28, 2026

Copy link
Copy Markdown
Member

Adds a daily workflow that closes pull requests nobody has worked on for a while, using actions/stale.

How it works

  • A pull request with no activity for 60 days gets the stale label and a comment saying it will be closed in 14 days.
  • Any commit, comment or review removes the label and starts the 60 days again.
  • If nothing happens in those 14 days, the pull request is closed with a thank-you comment.
  • Issues are not touched.

The workflow runs once a day and can also be started by hand from the Actions tab.

Counting activity

The action counts any activity, not just the author's. In practice a review from a maintainer is usually the last thing that happens before an author goes quiet, so it measures the right thing. A pull request waiting for review for 60 days would also be marked, and a comment from anyone keeps it open.

On the first run

Posted by Claude on behalf of @anakinj.

Runs actions/stale once a day. A pull request with no activity for 60 days
gets the stale label and a comment, and is closed 14 days later unless
someone pushes, comments or reviews in the meantime. Issues are left alone.

actions: write lets the action save and replace its state in the actions
cache between runs, and issues: write and pull-requests: write cover the
label, the comments and closing. The workflow can also be started by hand.
@anakinj
anakinj merged commit cdf0b0a into jwt:main Nov 28, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant