Skip to content

Close stale PRs

Close stale PRs #246

Workflow file for this run

---
# Stale PR Cleanup Workflow
#
# Why this exists:
# PRs that sit open for too long get forgotten and become merge nightmares.
# This workflow gently nudges us to either finish the work or close it.
#
# What it does:
# - After 30 days of no activity, marks the PR as stale
# - After 7 more days of no activity, closes the PR
# - Skips PRs labeled "dependencies" or "security" (those are important!)
#
# How to prevent closure:
# Just comment on the PR or push a commit - any activity resets the timer.
#
# DO NOT EDIT: Managed by Terraform at https://github.com/usetero/infrastructure
name: "Close stale PRs"
on:
schedule:
- cron: "30 1 * * *"
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
with:
stale-pr-message: "This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days."
close-pr-message: "This PR was closed because it has been stalled for 7 days with no activity."
days-before-pr-stale: 30
days-before-pr-close: 7
exempt-pr-labels: "dependencies,security"