Skip to content

Commit

Permalink
Adds the stale PR workflow (#2593)
Browse files Browse the repository at this point in the history
This change implements the stale PR template.

## Who is this for?

Developers who want good visibility of work in progress and a process for preventing proliferation of unmerged PRs.

## What is it doing for them?

Closing old PRs that haven't been merged in 30 days. Things that hang about for longer than that should be smaller PRs, released behind a toggle, or be Issues from which other PRs hang.
  • Loading branch information
kenoir authored Mar 18, 2024
1 parent a361f7a commit e82b381
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Automatically mark any pull requests that have been inactive for 30 days as "Stale"
# then close them 3 days later if there is still no activity.
#
# Shamelessly copied from https://github.com/guardian/.github/blob/main/workflow-templates/stale.yml
name: "Stale PR Handler"

on:
schedule:
# Check for Stale PRs every Monday to Thursday morning
# Don't check on Fridays as it wouldn't be very nice to have a bot mark your PR as Stale on Friday and then close it on Monday morning!
- cron: "0 6 * * MON-THU"

permissions:
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
id: stale
# Read about options here: https://github.com/actions/stale#all-options
with:
# never automatically mark issues as stale
days-before-issue-stale: -1

# Wait 30 days before marking a PR as stale
days-before-stale: 30
stale-pr-message: >
This PR is stale because it has been open 30 days with no activity.
Unless a comment is added or the “stale” label removed, this will be closed in 3 days
# Wait 3 days after a PR has been marked as stale before closing
days-before-close: 3
close-pr-message: This PR was closed because it has been stalled for 3 days with no activity.

# Ignore PR's raised by Dependabot
exempt-pr-labels: "dependencies"

0 comments on commit e82b381

Please sign in to comment.