feat: add dry-run stale PR lifecycle workflow - #44
Merged
Conversation
Shared Workflows CIShared workflows CI passed. View run output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Supersedes #43, whose branch could not be updated because of a README conflict after
mainadvanced. Adds_stale-pull-requests.yml, a dry-run-first reusable workflow for the approved 30-day inactive-PR policy.Fixes #
None.
Type of change
Validation
linton this rebased PR.mainREADME guidance.dry-run: trueconsumer pilot remains mandatory before live mode.Impact and rollout
Producer:
shared-workflowsowns_stale-pull-requests.yml. It uses only a full-SHA-pinned GitHub Script action.Consumer: none yet. A later
tfroot-github-owned caller and repository-local bootstrap PRs are required. This merge makes the producer callable but does not schedule, close, or delete anything.Behavior:
dry-rundefaults to true. Live mode closes non-draft, unassigned, unmilestoned PRs withpullRequest.updated_atat least 30 days old, excludingdo-not-close,blocked, andsecurity. It deletes only eligible, same-repository, unprotected non-default branches after verified closure and head/base reference checks; fork heads are skipped.Delivery stages: authored and submitted.
lintis pending. Merge is confirmation-gated. Consumer selection, dry-run pilot, live-mode enablement, PR closure, branch deletion, and any OpenTofu apply are all separate gates.Rollback: do not add a caller, or remove/disable it before live mode. A mistakenly closed PR can be reopened and GitHub's Restore branch path is the intended branch recovery method.
Safety and secrets
AI-assisted change: owner-approved implementation, dry-run by default. No consumer is activated by this PR.