mirror of
https://github.com/EbookFoundation/free-programming-books.git
synced 2025-07-31 21:20:11 +02:00
Fix stale workflow (#11865)
* wip - creating a new stale workflow * finalize stale workflow * enable statistics for stale workflow * re-configure stale workflow for testing
This commit is contained in:
47
.github/workflows/stale-new.yml
vendored
Normal file
47
.github/workflows/stale-new.yml
vendored
Normal file
@@ -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
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
@@ -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 }}
|
Reference in New Issue
Block a user