Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add a Github Action that automatically closes stale PRs. #2626

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

maniarathi
Copy link
Contributor

Reason for Change

As we move to CI/CD, some automation can help ensure that we're working towards trunk-based development and ensuring that non-draft PRs don't stay open too long without some movement. Ideally, this Github Action helps us with a few things:

  1. PRs remain small so that they can be reviewed quickly and merged.
  2. If a PR has be alive for more than 2 weeks, updates are required so that there is visibility as to why the PR is blocked.
  3. If the PR has to be alive for more than 2 weeks and is blocked, it reverts to being a draft PR or closed.

Ticket Number

No ticket.

Changes

Additions

Add a Github Action that runs daily. Each day all active (non-draft) PRs older than 2 weeks are marked with a stale tag and a warning comment is made to update the PR. In another 3 days (3 days was chosen to accommodate long weekends + 1 day), the PR will be automatically closed.

Deletions

None.

Modifications

None.

Testing steps

Not tested.

Notes for Reviewer

None.

@maniarathi maniarathi requested a review from seve August 20, 2023 18:53
@maniarathi maniarathi merged commit f749733 into main Aug 23, 2023
5 of 7 checks passed
@maniarathi maniarathi deleted the maniarathi/close-stale-prs branch August 23, 2023 02:08
@szhorvat
Copy link

The problem with this approach is that it closes PRs from external people without comment or a clear explanation of why their change was rejected. See e.g. #2622.

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.

3 participants