Skip to content

Fix stale workflow #11865

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

Merged
merged 4 commits into from
Apr 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/stale-new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 'Close Stale PRs'
on:
# Disable schedule for test purposes, enable once verified
# schedule:
# - cron: '0 0 * * *' # Run every day at midnight
workflow_dispatch:
inputs:
debug-only:
type: boolean
description: "Does a dry-run when enabled. No PR's will be altered"
required: true
default: true

permissions:
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
days-before-issue-stale: -1 # Don't mark issues as stale
days-before-issue-close: -1 # Don't close issues
stale-pr-message: |
'This Pull Request has been automatically marked as stale because it has not had recent activity during last 60 days :sleeping:

It will be closed in 30 days if no further activity occurs. To unstale this PR, draft it, remove stale label, comment with a detailed explanation or push more commits.

There can be many reasons why some specific PR has no activity. The most probable cause is lack of time, not lack of interest.

Thank you for your patience :heart:'
close-pr-message: |
This Pull Request has been automatically closed because it has been inactive during the last 30 days since being marked as stale.

As author or maintainer, it can always be reopened if you see that carry on been useful.

Anyway, thank you for your interest in contribute :heart:
days-before-pr-stale: 60
days-before-pr-close: 30
stale-pr-label: 'stale'
exempt-pr-labels: 'keep' # Don't mark PR's with this label as stale
labels-to-remove-when-unstale: 'stale'
exempt-draft-pr: true
debug-only: ${{ github.event.inputs.debug-only == 'true' }}
enable-statistics: true
# delete-branch: true
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,4 @@ jobs:
STALED_ISSUES: ${{ steps.set-staled.outputs.issues }}
CLOSED_ISSUES: ${{ steps.set-closed.outputs.issues }}
STALED_PRS: ${{ steps.set-staled.outputs.prs }}
CLOSED_PRS: ${{ steps.set-closed.outputs.prs }}
CLOSED_PRS: ${{ steps.set-closed.outputs.prs }}
Loading