Skip to content

Stale pull requests

Old pull requests pile up and hide the ones that matter. CoderHelm finds the ones no person has touched in weeks, warns on them, and closes them only if nothing happens, with a comment that says how to reopen.

github.com/example/web/pull/1408

Add retries to the export job #1408

stale
  1. Last activity from a person: a review comment, 7 days ago

  2. CoderHelm added the stale label and commented

    This pull request has had no activity for 7 days, so CoderHelm marked it stale. It will be closed in 7 days if nothing happens here.

    To keep it open, push a commit, leave a comment, remove the stale label, or comment @coderhelm keep open.

  3. example-ci[bot] commented: coverage report updatedNot activity
  4. 7 days later, CoderHelm closed this pull requestBranch kept

    Nothing is lost: the commits and this conversation stay here. To pick it back up, reopen this pull request.

A quiet pull request: the stale label and the warning, a bot comment that does not count as activity, and the close a week later with the branch kept.

How it decides

  1. 1

    Quiet for 7 days

    A pull request with no activity from a person for 7 days gets the stale label and a warning comment that says how to keep it open.

  2. 2

    Grace period of 7 days

    Any activity in that time takes the label off on its own, and so does a person removing the label.

  3. 3

    Closed, with a way back

    If nothing happened, it closes the pull request with a comment that says how to reopen. The commits and the conversation stay, and the branch is kept.

It looks at the open pull requests of each repository the reviewer is on for, about once an hour. Both numbers, the label and both comments are settings.

Bot comments are not activity

Activity is read from the pull request's timeline, not from its last updated time, which every bot comment and label moves. So its own warning never counts as activity, and neither do other bots.

Counts as activityNever counts
A commit, including CoderHelm's ownCoderHelm's warning, its label and its other comments
A force pushComments and commits from other bots
A person's comment, review or review commentCI runs
A person changing a label, requesting a review, changing the draft state or reopeningPushes to the base branch

Pull requests it leaves alone

  • Pull requests with an exempt label: keep-open, pinned, security and do-not-close by default, and you choose the list
  • Drafts, unless you turn that off
  • Pull requests by authors you list, people or bots
  • A pull request a CoderHelm run is working on, one it will check again on its own, or one auto merge is waiting to merge
  • Any pull request someone kept open, from the dashboard or with @coderhelm keep open
  • With Only CoderHelm's own chosen, every pull request CoderHelm didn't open

Defaults

  • Off by default

    Nothing happens until an admin turns it on.

  • Starts in Preview only

    The mode is Off, Preview only or On. In Preview only the dashboard lists what would be marked and closed, and when, under Would mark or close, and nothing changes on GitHub until you pick On. Check now works the list out again at any time.

  • Keep open, anywhere

    Comment @coderhelm keep open, push a commit, comment or remove the label. The author or anyone with write access can keep a pull request open.

  • The branch is kept

    Closing keeps the branch unless you choose to delete it, and even then never a fork's branch, the default branch or a branch another pull request is based on.

  • Closes are capped

    At most 10 closes per repository each hour by default, writes one at a time, and it waits out GitHub's rate limit.

  • Every action listed

    Each pull request marked, closed, un-staled or kept open is listed in the dashboard with the reason.

Your team's settings, or one repository's

Set it once for every repository, and give any repository its own settings. Both comments are yours to edit: leave one empty for the default, and the days and the label are filled in for you. See the docs for every setting.

Will it close a pull request someone still needs?

Only after a warning and 7 more days with no activity from a person, and never one that is exempt. A comment, a push or @coderhelm keep open keeps it.

What happens when someone reopens it?

It is treated like any other open pull request: reopening counts as activity, so the stale label comes off and it won't be marked again until it has gone the full quiet period (7 days by default) without activity.

Does it need new GitHub permissions?

No. It uses the permissions the CoderHelm GitHub App already has, and needs the permission to change contents only if you turn on deleting branches.

  • Code review

    Add a label to any GitHub pull request and CoderHelm reviews it with the context of the whole repository, comments on exact lines with suggested fixes, rates risk and reviews again on every push.

  • Maintenance

    CoderHelm stays on the code after the pull request: it answers review comments, fixes failing CI on its pull requests, resolves merge conflicts, checks deploys after merge and writes release notes.

  • Tickets to PRs

    Assign a GitHub issue or Jira ticket to CoderHelm and it plans the change, writes it on its own branch, runs your build and tests, reviews its own work and opens a pull request.

Put CoderHelm on your next ticket.

CoderHelm is in open beta. Sign up and bring your own Anthropic API key.