Skip to content

Commit

Permalink
Increase stale issue time & enhance stale bot config (#6924)
Browse files Browse the repository at this point in the history
* Increase durations for stale issues

This adjusts the durations before issues and PRs are considered stale,
and also before they're closed.

* Update and enhance messages

* Add a manual trigger for doing debug/dry runs

* Add a name for the job, for more useful logs

Without a name, the name shown in the GitHub UI for workflow execution
is "stale", which is uninformative and ambiguous.

* Add explanatory comments
  • Loading branch information
mhucka authored Jan 7, 2025
1 parent b5a04f0 commit 488bff4
Showing 1 changed file with 44 additions and 6 deletions.
50 changes: 44 additions & 6 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,57 @@
name: "Mark and close stale issues"
# Summary: perform stale issue & PR handling on a schedule
# For more info, see https://github.com/actions/stale/

name: "Label and close stale issues & PRs"

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
inputs:
debug:
# Note: the job body sets `debug-only` to false by default. The value
# of inputs.debug is an empty string unless this workflow is invoked
# manually. When it's invoked manually, GitHub's GUI presents the user
# with a checkbox for this flag; we default that checkbox to true
# because the most likely reason for a manual run is debugging.
description: "Run in debug mode (dry run)"
type: boolean
default: true

jobs:
stale:
name: Label and/or close stale issues and PRs
runs-on: ubuntu-20.04
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days'
days-before-stale: 30
days-before-close: 30
close-issue-message: 'Issue closed due to inactivity.'
repo-token: ${{secrets.GITHUB_TOKEN}}
debug-only: ${{inputs.debug || false}}
days-before-stale: 90
days-before-close: 60
stale-issue-label: 'status/stale'
stale-pr-label: 'status/stale'
exempt-issue-labels: 'triage/accepted,triage/discuss,kind/design-issue,kind/health,kind/roadmap-item,kind/task'
stale-issue-message: >
This issue has been automatically labeled as stale because 90 days
have passed without comments or other activity. If no further
activity occurs and the `status/stale` label is not removed within
60 days, it will be closed. If you believe this is in error or would
like to discuss it further, please leave a comment here.
stale-pr-message: >
This pull request has been automatically labeled as stale because 90
days have passed without comments or other activity. If no further
activity occurs and the `status/stale` label is not removed within 60
days, it will be closed. If you believe this is in error or would
like to discuss it further, please leave a comment here.
close-issue-message: >
This issue has been closed due to inactivity for 60 days since the
time the stale label was applied. If you believe this is in error or
would like to discuss it further, please either open a new issue
(and reference this one in it, for continuity) or reach out to the
Cirq project maintainers at [email protected].
close-pr-message: >
This pull-request has been closed due to inactivity for 60 days
since the time the stale label was applied. If you believe this is
in error or would like to discuss it further, please reach out to
the Cirq project maintainers at [email protected].

0 comments on commit 488bff4

Please sign in to comment.