CoderHelm Docs
Getting started

Stale pull requests

How CoderHelm marks pull requests nobody has worked on for a while, warns on them, and closes them after a grace period, with every setting, the three modes, exemptions and how to reopen.

Old pull requests pile up and hide the ones that matter. With stale pull requests on, CoderHelm marks a pull request that no person has worked on for a while, warns on it, and closes it after a grace period if nothing happens. It never counts its own comments or other bots as activity, it starts as Preview only, and it keeps the branch.

It is off by default. It works on the repositories the reviewer is on for.

Turn it on

Stale pull requests have their own tab under Code review: Reviewer, Stale PRs, Tests, Releases. You can also search for "Stale pull requests" in the command palette.

  1. Open Code review, then Stale PRs. The top of the page says which mode it is in: Off, Preview only or On.
  2. Press Turn on Preview only. Nothing changes on GitHub.
  3. Open Would mark or close and look at what it would do. When it looks right, open Settings, pick On under Mode and press Save settings.
ModeWhat happens
OffNothing happens.
Preview onlyCoderHelm lists which pull requests it would mark and close in the Would mark or close tab. Nothing is labeled, commented on or closed on GitHub.
OnAfter 7 days with no activity CoderHelm labels the pull request stale and comments; if nothing happens in the next 7 days it closes it. Up to 10 an hour per repository.

While it is off, every tab still lists what it holds: pull requests that carry the stale label (marked earlier, or labeled by hand) under Marked stale, and what it would do under Would mark or close.

Admins can change these settings and keep pull requests open. Everyone else can see them. The Reviewer page shows a line such as "3 pull requests marked stale, 1 closing tomorrow" that links to this page.

The page

ViewWhat it lists
Marked stalePull requests marked stale now, soonest to close first: the repository, the author, how many days it has been quiet and when it closes. Keep open keeps one open.
Would mark or close (Up next once it is On)What the next check would mark or close. Check now works it out again.
Recently closedPull requests closed as stale in the last 90 days, each with a Reopen on GitHub link.
ExemptPull requests left alone because of a label, an author or a draft, and the ones kept open, with Allow closing.
SettingsThe settings below, for all repositories or one.

Filter every view by repository, or search by number, title or author.

How it decides

About once an hour, CoderHelm looks at the open pull requests of each repository:

  1. 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. Any activity after the warning takes the label off on its own, and so does a person removing the label.
  3. If nothing happens in the next 7 days, it closes the pull request with a comment that says how to reopen it. The branch is kept.

By default that is 7 days quiet + 7 days to close = closed after 14 days with no activity. Settings saved before the default changed keep their own numbers.

When it closes a pull request that CoderHelm opened, the run behind it is closed too, with the reason on the run page.

What counts as activity

Activity is read from the pull request's timeline, never from its last updated time. Every bot comment and label moves that time, so a tool that reads it takes its own warning back, or keeps a pull request open on bot noise alone.

Counts as activityNever counts
A commit, CoderHelm's own included (it is work on the branch)CoderHelm's warning, its stale label and its other comments
A force pushComments, reviews and commits by other bots
A person's comment, review or review commentCI runs
A person adding or removing a label, other than CoderHelm adding the stale labelPushes to the base branch
A person requesting a review, assigning someone, renaming it, marking it ready or a draft, or reopening it

Never marked or closed

  • Pull requests with an exempt label. The defaults are keep-open, pinned, security and do-not-close.
  • Drafts, unless you turn Never mark drafts off.
  • Pull requests by the authors you list, people or bots.
  • With Only CoderHelm's own chosen, every pull request CoderHelm didn't open.
  • A pull request a CoderHelm run is working on, one CoderHelm will check again on its own (a draft waiting for checks), or one auto-merge is waiting to merge.
  • A pull request someone kept open, with @coderhelm keep open or from the dashboard.

When a pull request CoderHelm marked becomes exempt, CoderHelm takes its label off. A stale label a person added stays theirs.

Keep one open

On GitHub, any of these keeps a pull request open:

  • push a commit, leave a comment or review;
  • remove the stale label;
  • comment @coderhelm keep open (or keep this open, do not close, not stale).

@coderhelm keep open works for the pull request's author and anyone with write access to the repository. CoderHelm reacts with a thumbs up, and the pull request is never marked or closed as stale after that. Anyone else gets a reply that says only the author or someone with write access can keep it open, and nothing changes.

In the dashboard, Keep open on a pull request in the list does the same. The Exempt view shows who kept each one open and how, and Allow closing undoes it.

Preview only

Turned on, it starts as Preview only. CoderHelm works out what it would do and changes nothing on GitHub: no labels, no comments, no closes.

Would mark or close on the Stale PRs page lists every pull request a check would mark or close, across your repositories, with who opened it, how long it has been quiet and its last activity. Check now works the list out again at any time, for the repository picked or all of them; it reads GitHub and changes nothing. The list updates in a minute or two.

Pick On under Mode once the list looks right. Marked stale then shows what is marked and when each one closes.

What the comments say

These are the default messages. {stale_days}, {close_days} and {label} are filled in from your settings.

The warning:

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.

When closing:

CoderHelm closed this pull request: it was marked stale 7 days ago and nothing happened since. Nothing is lost: the commits and this conversation stay here.

To pick it back up, reopen this pull request. It won't be marked stale again until it has gone 7 days without activity.

When the branch was deleted with it, the closing comment also says to use Restore branch on the pull request before reopening.

Reopening

Reopen the pull request on GitHub. Reopening counts as activity, so the stale label comes off on the next check, and the pull request isn't marked again until it has gone the full number of days without activity. If the branch was deleted, press Restore branch on the pull request first.

Settings

Open Settings on the Stale PRs page. Settings for at the top picks what you change: All repositories, or one repository. A repository shows Inherited from all repositories until you press Use different settings here; then it shows Overridden here and uses only its own settings. Reset to all repositories drops them again. Press Save settings after either.

SettingWhat it doesDefault
ModeOff, Preview only (shows what would be marked and closed, changes nothing on GitHub) or On. Nothing saved reads as off, and the page says so.Off
Mark stale after (days)Days with no activity before the label and the warning. From 1 to 365.7
Close after (more days)Days after the warning before it closes. From 1 to 90.7
Closes per hourThe most pull requests closed per repository in each hourly check. From 1 to 50.10
Which pull requestsEvery pull request, or Only CoderHelm's own.Every pull request
Never mark: LabelsLabels that exempt a pull request, comma separated.keep-open, pinned, security, do-not-close
Never mark: AuthorsGitHub logins that are exempt, comma separated. Bots too, like renovate[bot].None
Never mark draftsDrafts are exempt.On
Stale labelThe label added with the warning. Removing it keeps the pull request open.stale
Delete the branch when closingDeletes the branch with the close. Never a fork's branch, the default branch, or a branch another pull request is based on.Off
Messages: WarningThe warning comment. Leave it empty for the default.Above
Messages: When closingThe closing comment. Leave it empty for the default. It should say how to reopen.Above

Safe by default

  • Writes go one at a time with a pause between them. At most 30 pull requests are marked per repository in each check, and closes stop at Closes per hour. GitHub's rate limit stops a repository for that check, and the next one carries on.
  • A large backlog is covered over a few hours instead of all at once.
  • Every pull request marked, closed, un-staled or kept open is listed under What CoderHelm did, with the reason. Entries are kept for 90 days.

GitHub App permissions

It uses the permissions the CoderHelm GitHub App already has: Pull requests: write to close, Issues: write for the label and the comments, and Contents: write only to delete a branch when you turn that on.

Edit on GitHub

On this page