Skip to content

Commit 4f0f6b7

Browse files
authored
Fix stale workflow (#11865)
* wip - creating a new stale workflow * finalize stale workflow * enable statistics for stale workflow * re-configure stale workflow for testing
1 parent a0ff9b4 commit 4f0f6b7

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

Diff for: .github/workflows/stale-new.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: 'Close Stale PRs'
2+
on:
3+
# Disable schedule for test purposes, enable once verified
4+
# schedule:
5+
# - cron: '0 0 * * *' # Run every day at midnight
6+
workflow_dispatch:
7+
inputs:
8+
debug-only:
9+
type: boolean
10+
description: "Does a dry-run when enabled. No PR's will be altered"
11+
required: true
12+
default: true
13+
14+
permissions:
15+
pull-requests: write
16+
17+
jobs:
18+
stale:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/stale@v9
22+
with:
23+
days-before-issue-stale: -1 # Don't mark issues as stale
24+
days-before-issue-close: -1 # Don't close issues
25+
stale-pr-message: |
26+
'This Pull Request has been automatically marked as stale because it has not had recent activity during last 60 days :sleeping:
27+
28+
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.
29+
30+
There can be many reasons why some specific PR has no activity. The most probable cause is lack of time, not lack of interest.
31+
32+
Thank you for your patience :heart:'
33+
close-pr-message: |
34+
This Pull Request has been automatically closed because it has been inactive during the last 30 days since being marked as stale.
35+
36+
As author or maintainer, it can always be reopened if you see that carry on been useful.
37+
38+
Anyway, thank you for your interest in contribute :heart:
39+
days-before-pr-stale: 60
40+
days-before-pr-close: 30
41+
stale-pr-label: 'stale'
42+
exempt-pr-labels: 'keep' # Don't mark PR's with this label as stale
43+
labels-to-remove-when-unstale: 'stale'
44+
exempt-draft-pr: true
45+
debug-only: ${{ github.event.inputs.debug-only == 'true' }}
46+
enable-statistics: true
47+
# delete-branch: true

Diff for: .github/workflows/stale.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,4 @@ jobs:
206206
STALED_ISSUES: ${{ steps.set-staled.outputs.issues }}
207207
CLOSED_ISSUES: ${{ steps.set-closed.outputs.issues }}
208208
STALED_PRS: ${{ steps.set-staled.outputs.prs }}
209-
CLOSED_PRS: ${{ steps.set-closed.outputs.prs }}
209+
CLOSED_PRS: ${{ steps.set-closed.outputs.prs }}

0 commit comments

Comments
 (0)