diff --git a/.github/workflows/stale-new.yml b/.github/workflows/stale-new.yml new file mode 100644 index 0000000000000..38399bd6f748a --- /dev/null +++ b/.github/workflows/stale-new.yml @@ -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 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index bf564d555c84b..50c58138aa1b4 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -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 }} \ No newline at end of file