Skip to content

add stale PR bot#12279

Merged
mekarpeles merged 4 commits intointernetarchive:masterfrom
RayBB:stale-pr-messenger
Apr 3, 2026
Merged

add stale PR bot#12279
mekarpeles merged 4 commits intointernetarchive:masterfrom
RayBB:stale-pr-messenger

Conversation

@RayBB
Copy link
Copy Markdown
Collaborator

@RayBB RayBB commented Apr 3, 2026

On a call today with @lokesh @mekarpeles and @cdrini we discussed adding a bot to help nudge PRs that are waiting on submitter input.

The goal here is twofold:

  1. Reduce the burden on maintainers
  2. Improve the experience of contributing to Open Library's codebase

How this does this:

  1. Maintainers won't have the cogitative overhead of looking through their many assigned issues and having to follow up with folks who didn't respond to feedback yet. Instead, when they label an issue as Needs: Submitter Input they know the process will be taken care of for them to nudge the contributor.
  2. If you're a contributor this means that if staff gives you feedback and you miss it or forget it you'll have two nice automated reminders at reasonable intervals. First, a warning after one week. All you have to do is comment with your intention to work on it or push up a change.

Another benefit of this is when PRs are automatically closed with no activity is that this should make it easier for folks to find issues to work on that have been stale.

In practice this is a rather minor and incremental change to our workflow.

At present only 4 PRs would get a message encouraging them to follow up:

It may seem like if it effects so few PRs then why does it matter?

  1. There have been nearly 100 PRs that have been closed (not merged) while having this label.
  2. This is somewhat of a new workflow that can be expanded upon. If maintainers know this will happen it makes them more likely to use the label. In the future we could also automatically apply the submitter input label when maintainers request changes on a PR.

I want to emphasize, that this is an experiment to help us deal with many new contributors and an enormous backlog of PRs to review. It may seem a little impersonal to have this added but in the big picture it should give make more time having those important connections and conversations instead of just asking someone to please follow up. As such, we can always revert this if it turns out to be too noisy or problematic.

Prior Art

This complements our existing pm_stale_ticket_labeler.yml workflow, which silently labels assigned issues as Needs: Review Assignee after 14 days of inactivity (but never closes anything). This new workflow takes the next step by actually following up with PR authors and closing when there's no response.

Again, I'll emphasize there's a lot of possibilities here like maybe in the future we should unassign them from the issue when we close the PR. However, we can keep it as baby steps.

Technical

Testing

Screenshot

Stakeholders

@mekarpeles
Copy link
Copy Markdown
Member

I agree that it nudge is important but I don't think we want to close it after 7 days

with:
only-pr-labels: "Needs: Submitter Input"
days-before-issue-stale: -1 # disable issue stale
days-before-pr-close: 7
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

X

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit confusing, but this is, indeed, closing it seven days after it has been labeled as "stale"

https://github.com/actions/stale?tab=readme-ov-file#days-before-close

The idle number of days before closing the stale issues or the stale pull requests (due to the stale label).
The issues or the pull requests will be closed if the last update (based on GitHub issue field updated_at) is older than the idle number of days.
Since adding the stale label will alter the last update date, we can calculate the number of days from this date.

RayBB added 2 commits April 3, 2026 11:58
Disable automatic closing of stale pull requests.
@RayBB
Copy link
Copy Markdown
Collaborator Author

RayBB commented Apr 3, 2026

@mekarpeles I updated this to not close any issues. Just add a comment to them.

@mekarpeles mekarpeles merged commit 7618cfd into internetarchive:master Apr 3, 2026
3 checks passed
@RayBB RayBB deleted the stale-pr-messenger branch April 3, 2026 19:06
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.

2 participants