Opened 2 months ago

Last modified 13 days ago

#33629 assigned task

Use stale bot to close old pull requests

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

Description

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:
https://probot.github.io/apps/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 (6)

comment:1 Changed 2 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 bugs.torproject.org".

comment:2 Changed 2 months ago by teor

Yes, we can change the message. For details, see:
https://probot.github.io/apps/stale/

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

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

comment:3 Changed 2 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 2 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:
https://github.com/probot

What hosting or infrastructure requirements are there for running it?

It runs as a GitHub app on github.io:
https://developer.github.com/apps/

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 8 weeks ago by teor (previous) (diff)

comment:5 Changed 8 weeks ago by teor

Keywords: 044-should added

comment:6 Changed 13 days ago by teor

Owner: teor deleted

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

Note: See TracTickets for help on using tickets.