mirror of
https://github.com/redis/go-redis.git
synced 2025-08-08 23:42:06 +03:00
Improve stale issue workflow (#3458)
* updated stale issue policy Signed-off-by: Elena Kolevska <elena@kolevska.com> * Adds a temporary dry run Signed-off-by: Elena Kolevska <elena@kolevska.com> --------- Signed-off-by: Elena Kolevska <elena@kolevska.com>
This commit is contained in:
108
.github/workflows/stale-issues.yml
vendored
108
.github/workflows/stale-issues.yml
vendored
@@ -1,25 +1,97 @@
|
|||||||
name: "Close stale issues"
|
name: "Stale Issue Management"
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *"
|
# Run daily at midnight UTC
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
workflow_dispatch: # Allow manual triggering
|
||||||
|
|
||||||
|
env:
|
||||||
|
# Default stale policy timeframes
|
||||||
|
DAYS_BEFORE_STALE: 365
|
||||||
|
DAYS_BEFORE_CLOSE: 30
|
||||||
|
|
||||||
|
# Accelerated timeline for needs-information issues
|
||||||
|
NEEDS_INFO_DAYS_BEFORE_STALE: 30
|
||||||
|
NEEDS_INFO_DAYS_BEFORE_CLOSE: 7
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
permissions:
|
|
||||||
issues: write # to close stale issues (actions/stale)
|
|
||||||
pull-requests: write # to close stale PRs (actions/stale)
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v9
|
- uses: actions/stale@v9
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
stale-issue-message: 'This issue is marked stale. It will be closed in 30 days if it is not updated.'
|
dry-run: true
|
||||||
stale-pr-message: 'This pull request is marked stale. It will be closed in 30 days if it is not updated.'
|
|
||||||
days-before-stale: 365
|
# Default stale policy
|
||||||
days-before-close: 30
|
days-before-stale: ${{ env.DAYS_BEFORE_STALE }}
|
||||||
stale-issue-label: "Stale"
|
days-before-close: ${{ env.DAYS_BEFORE_CLOSE }}
|
||||||
stale-pr-label: "Stale"
|
|
||||||
operations-per-run: 10
|
# Explicit stale label configuration
|
||||||
remove-stale-when-updated: true
|
stale-issue-label: "stale"
|
||||||
|
stale-pr-label: "stale"
|
||||||
|
|
||||||
|
stale-issue-message: |
|
||||||
|
This issue has been automatically marked as stale due to inactivity.
|
||||||
|
It will be closed in 30 days if no further activity occurs.
|
||||||
|
If you believe this issue is still relevant, please add a comment to keep it open.
|
||||||
|
|
||||||
|
close-issue-message: |
|
||||||
|
This issue has been automatically closed due to inactivity.
|
||||||
|
If you believe this issue is still relevant, please reopen it or create a new issue with updated information.
|
||||||
|
|
||||||
|
# Exclude needs-information issues from this job
|
||||||
|
exempt-issue-labels: 'no-stale,needs-information'
|
||||||
|
|
||||||
|
# Remove stale label when issue/PR becomes active again
|
||||||
|
remove-stale-when-updated: true
|
||||||
|
|
||||||
|
# Apply to pull requests with same timeline
|
||||||
|
days-before-pr-stale: ${{ env.DAYS_BEFORE_STALE }}
|
||||||
|
days-before-pr-close: ${{ env.DAYS_BEFORE_CLOSE }}
|
||||||
|
|
||||||
|
stale-pr-message: |
|
||||||
|
This pull request has been automatically marked as stale due to inactivity.
|
||||||
|
It will be closed in 30 days if no further activity occurs.
|
||||||
|
|
||||||
|
close-pr-message: |
|
||||||
|
This pull request has been automatically closed due to inactivity.
|
||||||
|
If you would like to continue this work, please reopen the PR or create a new one.
|
||||||
|
|
||||||
|
# Only exclude no-stale PRs (needs-information PRs follow standard timeline)
|
||||||
|
exempt-pr-labels: 'no-stale'
|
||||||
|
|
||||||
|
# Separate job for needs-information issues ONLY with accelerated timeline
|
||||||
|
stale-needs-info:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/stale@v9
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
dry-run: true
|
||||||
|
|
||||||
|
# Accelerated timeline for needs-information
|
||||||
|
days-before-stale: ${{ env.NEEDS_INFO_DAYS_BEFORE_STALE }}
|
||||||
|
days-before-close: ${{ env.NEEDS_INFO_DAYS_BEFORE_CLOSE }}
|
||||||
|
|
||||||
|
# Explicit stale label configuration
|
||||||
|
stale-issue-label: "stale"
|
||||||
|
|
||||||
|
# Only target ISSUES with needs-information label (not PRs)
|
||||||
|
only-issue-labels: 'needs-information'
|
||||||
|
|
||||||
|
stale-issue-message: |
|
||||||
|
This issue has been marked as stale because it requires additional information
|
||||||
|
that has not been provided for 30 days. It will be closed in 7 days if the
|
||||||
|
requested information is not provided.
|
||||||
|
|
||||||
|
close-issue-message: |
|
||||||
|
This issue has been closed because the requested information was not provided within the specified timeframe.
|
||||||
|
If you can provide the missing information, please reopen this issue or create a new one.
|
||||||
|
|
||||||
|
# Disable PR processing for this job
|
||||||
|
days-before-pr-stale: -1
|
||||||
|
days-before-pr-close: -1
|
||||||
|
|
||||||
|
# Remove stale label when issue becomes active again
|
||||||
|
remove-stale-when-updated: true
|
Reference in New Issue
Block a user