Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release. Release Notes
For more details, see the full release notes on the release page
Warns and then closes issues and PRs that have had no activity for a specified amount of time.
The configuration must be on the default branch and the default values will:
For the execution of this action, it must be able to fetch all issues and pull requests from your repository.
In addition, based on the provided configuration, the action could require more permission(s) (e.g.: add label, remove label, comment, close, delete branch, etc.).
This can be achieved with the following configuration in the action if the permissions are restricted:
permissions:
actions: write
contents: write # only for delete-branch option
issues: write
pull-requests: write
You can find more information about the required permissions under the corresponding options that you wish to use.
If the action ends because of operations-per-run then the next run will start from the first unprocessed issue skipping the issues processed during the previous run(s). The state is reset when all the issues are processed. This should be considered for scheduling workflow runs.
The saved state lifetime is the same as the actions cache configured for the repo.
Every argument is optional.
| Input | Description | Default |
|---|---|---|
| repo-token | PAT for GitHub API authentication | ${{ github.token }} |
| days-before-stale | Idle number of days before marking issues/PRs stale | 60 |
| days-before-issue-stale | Override days-before-stale for issues only | |
| days-before-pr-stale | Override days-before-stale for PRs only | |
| days-before-close | Idle number of days before closing stale issues/PRs | 7 |
| days-before-issue-close | Override days-before-close for issues only | |
| days-before-pr-close | Override days-before-close for PRs only | |
| stale-issue-message | Comment on the staled issues | |
| stale-pr-message | Comment on the staled PRs | |
| close-issue-message | Comment on the staled issues while closed | |
| close-pr-message | Comment on the staled PRs while closed | |
| stale-issue-label | Label to apply on staled issues | Stale |
| close-issue-label | Label to apply on closed issues | |
| close-issue-reason | Reason to use when closing issues | not_planned |
| stale-pr-label | Label to apply on staled PRs | Stale |
| close-pr-label | Label to apply on closed PRs | |
| exempt-issue-labels | Labels on issues exempted from stale | |
| exempt-pr-labels | Labels on PRs exempted from stale | |
| only-labels | Only issues/PRs with ALL these labels are checked | |
| only-issue-labels | Override only-labels for issues only | |
| only-pr-labels | Override only-labels for PRs only | |
| any-of-labels | Only issues/PRs with ANY of these labels are checked | |
| any-of-issue-labels | Override any-of-labels for issues only | |
| any-of-pr-labels | Override any-of-labels for PRs only | |
| operations-per-run | Max number of operations per run | 30 |
| remove-stale-when-updated | Remove stale label from issues/PRs on updates | true |
| remove-issue-stale-when-updated | Remove stale label from issues on updates/comments | |
| remove-pr-stale-when-updated | Remove stale label from PRs on updates/comments | |
| labels-to-add-when-unstale | Add specified labels from issues/PRs when they become unstale | |
| labels-to-remove-when-stale | Remove specified labels from issues/PRs when they become stale | |
| labels-to-remove-when-unstale | Remove specified labels from issues/PRs when they become unstale | |
| debug-only | Dry-run | false |
| ascending | Order to get issues/PRs | false |
| start-date | Skip stale action for issues/PRs created before it | |
| delete-branch | Delete branch after closing a stale PR | false |
| exempt-milestones | Milestones on issues/PRs exempted from stale | |
| exempt-issue-milestones | Override exempt-milestones for issues only | |
| exempt-pr-milestones | Override exempt-milestones for PRs only | |
| exempt-all-milestones | Exempt all issues/PRs with milestones from stale | false |
| exempt-all-issue-milestones | Override exempt-all-milestones for issues only | |
| exempt-all-pr-milestones | Override exempt-all-milestones for PRs only | |
| exempt-assignees | Assignees on issues/PRs exempted from stale | |
| exempt-issue-assignees | Override exempt-assignees for issues only | |
| exempt-pr-assignees | Override exempt-assignees for PRs only | |
| exempt-all-assignees | Exempt all issues/PRs with assignees from stale | false |
| exempt-all-issue-assignees | Override exempt-all-assignees for issues only | |
| exempt-all-pr-assignees | Override exempt-all-assignees for PRs only | |
| exempt-draft-pr | Skip the stale action for draft PRs | false |
| enable-statistics | Display statistics in the logs | true |
| ignore-updates | Any update (update/comment) can reset the stale idle time on the issues/PRs | false |
| ignore-issue-updates | Override ignore-updates for issues only | |
| ignore-pr-updates | Override ignore-updates for PRs only | |
| include-only-assigned | Process only assigned issues | false |
| sort-by | What to sort issues and PRs by | created |
| only-issue-types | Only issues with a matching type are processed as stale/closed. |
| Output | Description |
|---|---|
| staled-issues-prs | List of all staled issues and pull requests |
| closed-issues-prs | List of all closed issues and pull requests |
Personal Access Token (PAT) that allows the stale workflow to authenticate and perform API calls to GitHub.
Under the hood, it uses the @actions/github package.
Default value: ${{ github.token }}
The idle number of days before marking the issues or the pull requests as stale (by adding a label).
The issues or the pull requests will be marked as stale if the last update (based on GitHub issue field updated_at) is older than the idle number of days.
It means that any updates made, or any comments added to the issues or to the pull requests will restart the counter of days before marking as stale.
However, if you wish to ignore this behaviour so that the creation date (based on GitHub issue field created_at) only matters, you can disable the ignore-updates option.
If set to a negative number like -1, no issues or pull requests will be marked as stale automatically.
In that case, you can still add the stale label manually to mark as
$ claude mcp add stale \
-- python -m otcore.mcp_server <graph>