Opened 8 months ago

Last modified 5 months ago

#33629 assigned task

Use stale bot to close old pull requests

Reported by: teor Owned by: ahf
Priority: Medium Milestone: Tor: 0.4.4.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-github, 044-should, postfreeze-ok
Cc: Actual Points:
Parent ID: Points: 0.5
Reviewer: Sponsor:


Should we automatically close stale pull request on GitHub?

Some GitHub users won't contribute to a project with lots of open pull requests, because they think it's been abandoned. (Or they think we're bad at merging PRs.)

But lots of our PRs get left open because we've squashed and merged the PR, and GitHub doesn't recognise the squashed commits, so GitHub doesn't auto-close the PR.

Closing a PR:

  • hides it from the default list of PRs
  • hides its CI results in the PR itself (but they still appear in the PR list)

Anyone can reopen a closed PR. Re-opening a PR re-runs CI (which is usually what we want for old PRs).

I suggest we use probot stale:

With the following options:

  • daysUntilStale: 60
    • some backport PRs are older than 60 days, but their CI should have been checked when they were reviewed
    • we don't merge very many stale PRs to master
    • any period from 30 days (most reviews completed) to 6 months (release cycle) would probably work for us
  • daysUntilClose: 7
  • exemptLabels: pinned
  • staleLabel: stale-closed
  • markComment: (like the suggested one, but mention the "pinned" label)
  • closeComment: false

On the following network team repositories:

  • tor
    • ~400 older than 2 months
    • ~270 older than 6 months
  • torspec
    • 8 older than 2 months
    • 6 older than 6 months
  • chutney
    • 1 older than 6 months, needs to be pinned?
  • fallback-scripts

And the top-level GitHub config repository:

  • .github

Child Tickets

Change History (8)

comment:1 Changed 7 months ago by nickm

I wouldn't mind something like this. I wonder if we can customize the messages that the bot uses, so it says something like "Closing this ticket because it is older than XX days. If it should not be closed, then please reopen it, and make sure that there is a corresponding ticket on".

comment:2 Changed 7 months ago by teor

Yes, we can change the message. For details, see:

Let's say "on trac, in the Core Tor/Tor component"?

We might also want to use, so the links point to the new GitLab, when the migration happens.

comment:3 Changed 7 months ago by catalyst

This seems like a good idea to me.

Is Probot relatively well maintained? What hosting or infrastructure requirements are there for running it?

comment:4 in reply to:  3 Changed 7 months ago by teor

Replying to catalyst:

This seems like a good idea to me.

Is Probot relatively well maintained?

Seems active, the last change was 14 hours ago:

What hosting or infrastructure requirements are there for running it?

It runs as a GitHub app on

I think it will be useful, while we are still using GitHub for PRs. GitLab probably does its own thing, and that's fine.

Last edited 7 months ago by teor (previous) (diff)

comment:5 Changed 7 months ago by teor

Keywords: 044-should added

comment:6 Changed 6 months ago by teor

Owner: teor deleted

It's unlikely that I'll ever finish this tooling.

comment:7 Changed 5 months ago by nickm

Keywords: postfreeze-ok added

Mark tickets which are important or safe enough to look at post-freeze for 0.4.4.

comment:8 Changed 5 months ago by nickm

Owner: set to ahf
Note: See TracTickets for help on using tickets.