{"id":13450978,"url":"https://github.com/actions/stale","last_synced_at":"2025-05-14T08:00:22.351Z","repository":{"id":37773998,"uuid":"200437066","full_name":"actions/stale","owner":"actions","description":"Marks issues and pull requests that have not had recent interaction","archived":false,"fork":false,"pushed_at":"2025-05-05T12:23:35.000Z","size":26489,"stargazers_count":1475,"open_issues_count":95,"forks_count":386,"subscribers_count":42,"default_branch":"main","last_synced_at":"2025-05-07T07:01:47.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/actions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-08-04T01:32:21.000Z","updated_at":"2025-05-06T22:39:41.000Z","dependencies_parsed_at":"2023-11-16T14:46:01.516Z","dependency_job_id":"c85779b8-0bd3-4f90-b017-ff77b2f662bb","html_url":"https://github.com/actions/stale","commit_stats":{"total_commits":415,"total_committers":81,"mean_commits":"5.1234567901234565","dds":0.6795180722891566,"last_synced_commit":"f04443dce335c74ba15c65f4cbb3688e6cb6a6ec"},"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fstale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fstale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fstale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fstale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actions","download_url":"https://codeload.github.com/actions/stale/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253321906,"owners_count":21890489,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T07:00:42.042Z","updated_at":"2025-05-14T08:00:22.213Z","avatar_url":"https://github.com/actions.png","language":"TypeScript","funding_links":[],"categories":["Actions used in this repository:","TypeScript","Official Resources","Automation","others","二、核心官方Action（工作流必备）","Bot Frameworks","Browse The Shelves","📖 Category Details"],"sub_categories":["Official Actions","2. GitHub 自动化工具","Flaky Test Detection","Repo automation tools","**8. Task Automation \u0026 Project Management**"],"readme":"# Close Stale Issues and PRs\n\n[![Basic validation](https://github.com/actions/stale/actions/workflows/basic-validation.yml/badge.svg?branch=main)](https://github.com/actions/stale/actions/workflows/basic-validation.yml)\n[![e2e tests](https://github.com/actions/stale/actions/workflows/e2e-tests.yml/badge.svg?branch=main)](https://github.com/actions/stale/actions/workflows/e2e-tests.yml)\n\nWarns and then closes issues and PRs that have had no activity for a specified amount of time.\n\nThe configuration must be on the default branch and the default values will:\n\n- Add a label \"Stale\" on issues and pull requests after 60 days of inactivity and comment on them\n- Close the stale issues and pull requests after 7 days of inactivity\n- If an update/comment occur on stale issues or pull requests, the stale label will be removed and the timer will restart\n\n## Recommended permissions\n\nFor the execution of this action, it must be able to fetch all issues and pull requests from your repository.  \nIn addition, based on the provided configuration, the action could require more permission(s) (e.g.: add label, remove label, comment, close, delete branch, etc.).  \nThis can be achieved with the following [configuration in the action](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions) if the permissions are restricted:\n\n```yaml\npermissions:\n  actions: write\n  contents: write # only for delete-branch option\n  issues: write\n  pull-requests: write\n```\n\nYou can find more information about the required permissions under the corresponding options that you wish to use.\n\n## Statefulness\n\nIf the action ends because of [operations-per-run](#operations-per-run) then the next run will start from the first\nunprocessed issue skipping the issues processed during the previous run(s). The state is reset when all the issues are\nprocessed. This should be considered for scheduling workflow runs.\n\nThe saved state lifetime is the same as the\n[actions cache](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy)\nconfigured for the repo.\n\n## All options\n\n### List of input options\n\nEvery argument is optional.\n\n| Input                                                               | Description                                                                 | Default               |\n| ------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------- |\n| [repo-token](#repo-token)                                           | PAT for GitHub API authentication                                           | `${{ github.token }}` |\n| [days-before-stale](#days-before-stale)                             | Idle number of days before marking issues/PRs stale                         | `60`                  |\n| [days-before-issue-stale](#days-before-issue-stale)                 | Override [days-before-stale](#days-before-stale) for issues only            |                       |\n| [days-before-pr-stale](#days-before-pr-stale)                       | Override [days-before-stale](#days-before-stale) for PRs only               |                       |\n| [days-before-close](#days-before-close)                             | Idle number of days before closing stale issues/PRs                         | `7`                   |\n| [days-before-issue-close](#days-before-issue-close)                 | Override [days-before-close](#days-before-close) for issues only            |                       |\n| [days-before-pr-close](#days-before-pr-close)                       | Override [days-before-close](#days-before-close) for PRs only               |                       |\n| [stale-issue-message](#stale-issue-message)                         | Comment on the staled issues                                                |                       |\n| [stale-pr-message](#stale-pr-message)                               | Comment on the staled PRs                                                   |                       |\n| [close-issue-message](#close-issue-message)                         | Comment on the staled issues while closed                                   |                       |\n| [close-pr-message](#close-pr-message)                               | Comment on the staled PRs while closed                                      |                       |\n| [stale-issue-label](#stale-issue-label)                             | Label to apply on staled issues                                             | `Stale`               |\n| [close-issue-label](#close-issue-label)                             | Label to apply on closed issues                                             |                       |\n| [close-issue-reason](#close-issue-reason)                           | Reason to use when closing issues                                           | `not_planned`         |\n| [stale-pr-label](#stale-pr-label)                                   | Label to apply on staled PRs                                                | `Stale`               |\n| [close-pr-label](#close-pr-label)                                   | Label to apply on closed PRs                                                |                       |\n| [exempt-issue-labels](#exempt-issue-labels)                         | Labels on issues exempted from stale                                        |                       |\n| [exempt-pr-labels](#exempt-pr-labels)                               | Labels on PRs exempted from stale                                           |                       |\n| [only-labels](#only-labels)                                         | Only issues/PRs with ALL these labels are checked                           |                       |\n| [only-issue-labels](#only-issue-labels)                             | Override [only-labels](#only-labels) for issues only                        |                       |\n| [only-pr-labels](#only-pr-labels)                                   | Override [only-labels](#only-labels) for PRs only                           |                       |\n| [any-of-labels](#any-of-labels)                                     | Only issues/PRs with ANY of these labels are checked                        |                       |\n| [any-of-issue-labels](#any-of-issue-labels)                         | Override [any-of-labels](#any-of-labels) for issues only                    |                       |\n| [any-of-pr-labels](#any-of-pr-labels)                               | Override [any-of-labels](#any-of-labels) for PRs only                       |                       |\n| [operations-per-run](#operations-per-run)                           | Max number of operations per run                                            | `30`                  |\n| [remove-stale-when-updated](#remove-stale-when-updated)             | Remove stale label from issues/PRs on updates                               | `true`                |\n| [remove-issue-stale-when-updated](#remove-issue-stale-when-updated) | Remove stale label from issues on updates/comments                          |                       |\n| [remove-pr-stale-when-updated](#remove-pr-stale-when-updated)       | Remove stale label from PRs on updates/comments                             |                       |\n| [labels-to-add-when-unstale](#labels-to-add-when-unstale)           | Add specified labels from issues/PRs when they become unstale               |                       |\n| [labels-to-remove-when-stale](#labels-to-remove-when-stale)         | Remove specified labels from issues/PRs when they become stale              |                       |\n| [labels-to-remove-when-unstale](#labels-to-remove-when-unstale)     | Remove specified labels from issues/PRs when they become unstale            |                       |\n| [debug-only](#debug-only)                                           | Dry-run                                                                     | `false`               |\n| [ascending](#ascending)                                             | Order to get issues/PRs                                                     | `false`               |\n| [start-date](#start-date)                                           | Skip stale action for issues/PRs created before it                          |                       |\n| [delete-branch](#delete-branch)                                     | Delete branch after closing a stale PR                                      | `false`               |\n| [exempt-milestones](#exempt-milestones)                             | Milestones on issues/PRs exempted from stale                                |                       |\n| [exempt-issue-milestones](#exempt-issue-milestones)                 | Override [exempt-milestones](#exempt-milestones) for issues only            |                       |\n| [exempt-pr-milestones](#exempt-pr-milestones)                       | Override [exempt-milestones](#exempt-milestones) for PRs only               |                       |\n| [exempt-all-milestones](#exempt-all-milestones)                     | Exempt all issues/PRs with milestones from stale                            | `false`               |\n| [exempt-all-issue-milestones](#exempt-all-issue-milestones)         | Override [exempt-all-milestones](#exempt-all-milestones) for issues only    |                       |\n| [exempt-all-pr-milestones](#exempt-all-pr-milestones)               | Override [exempt-all-milestones](#exempt-all-milestones) for PRs only       |                       |\n| [exempt-assignees](#exempt-assignees)                               | Assignees on issues/PRs exempted from stale                                 |                       |\n| [exempt-issue-assignees](#exempt-issue-assignees)                   | Override [exempt-assignees](#exempt-assignees) for issues only              |                       |\n| [exempt-pr-assignees](#exempt-pr-assignees)                         | Override [exempt-assignees](#exempt-assignees) for PRs only                 |                       |\n| [exempt-all-assignees](#exempt-all-assignees)                       | Exempt all issues/PRs with assignees from stale                             | `false`               |\n| [exempt-all-issue-assignees](#exempt-all-issue-assignees)           | Override [exempt-all-assignees](#exempt-all-assignees) for issues only      |                       |\n| [exempt-all-pr-assignees](#exempt-all-pr-assignees)                 | Override [exempt-all-assignees](#exempt-all-assignees) for PRs only         |                       |\n| [exempt-draft-pr](#exempt-draft-pr)                                 | Skip the stale action for draft PRs                                         | `false`               |\n| [enable-statistics](#enable-statistics)                             | Display statistics in the logs                                              | `true`                |\n| [ignore-updates](#ignore-updates)                                   | Any update (update/comment) can reset the stale idle time on the issues/PRs | `false`               |\n| [ignore-issue-updates](#ignore-issue-updates)                       | Override [ignore-updates](#ignore-updates) for issues only                  |                       |\n| [ignore-pr-updates](#ignore-pr-updates)                             | Override [ignore-updates](#ignore-updates) for PRs only                     |                       |\n| [include-only-assigned](#include-only-assigned)                     | Process only assigned issues                                                | `false`               |\n\n### List of output options\n\n| Output            | Description                                 |\n| ----------------- | ------------------------------------------- |\n| staled-issues-prs | List of all staled issues and pull requests |\n| closed-issues-prs | List of all closed issues and pull requests |\n\n### Detailed options\n\n#### repo-token\n\nPersonal Access Token (PAT) that allows the stale workflow to authenticate and perform API calls to GitHub.  \nUnder the hood, it uses the [@actions/github](https://www.npmjs.com/package/@actions/github) package.\n\nDefault value: `${{ github.token }}`\n\n#### days-before-stale\n\nThe idle number of days before marking the issues or the pull requests as stale (by adding a label).  \nThe issues or the pull requests will be marked as stale if the last update (based on [GitHub issue](https://docs.github.com/en/rest/reference/issues) field `updated_at`) is older than the idle number of days.  \nIt 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.  \nHowever, if you wish to ignore this behaviour so that the creation date (based on [GitHub issue](https://docs.github.com/en/rest/reference/issues) field `created_at`) only matters, you can disable the [ignore-updates](#ignore-updates) option.\n\nIf set to a negative number like `-1`, no issues or pull requests will be marked as stale automatically.  \nIn that case, you can still add the stale label manually to mark as stale.\n\nThe label used to stale is defined by these two options:\n\n- [stale-issue-label](#stale-issue-label)\n- [stale-pr-label](#stale-pr-label)\n\nA comment can also be added to notify about the stale and is defined by these two options:\n\n- [stale-issue-message](#stale-issue-message)\n- [stale-pr-message](#stale-pr-message)\n\nYou can fine tune which issues or pull requests should be marked as stale based on the milestones, the assignees, the creation date and the missing/present labels from these options:\n\n- [exempt-issue-labels](#exempt-issue-labels)\n- [exempt-pr-labels](#exempt-pr-labels)\n- [only-labels](#only-labels)\n- [any-of-labels](#any-of-labels)\n- [start-date](#start-date)\n- [exempt-milestones](#exempt-milestones)\n- [exempt-all-milestones](#exempt-all-milestones)\n- [exempt-assignees](#exempt-assignees)\n- [exempt-all-assignees](#exempt-all-assignees)\n- [ignore-updates](#ignore-updates)\n\nDefault value: `60`\n\n#### days-before-issue-stale\n\nUseful to override [days-before-stale](#days-before-stale) but only for the idle number of days before marking the issues as stale.\n\nDefault value: unset\n\n#### days-before-pr-stale\n\nUseful to override [days-before-stale](#days-before-stale) but only for the idle number of days before marking the pull requests as stale.\n\nDefault value: unset\n\n#### days-before-close\n\nThe idle number of days before closing the stale issues or the stale pull requests (due to the stale label).  \nThe issues or the pull requests will be closed if the last update (based on [GitHub issue](https://docs.github.com/en/rest/reference/issues) field `updated_at`) is older than the idle number of days.  \nSince adding the stale label will alter the last update date, we can calculate the number of days from this date.\n\nIf set to a negative number like `-1`, the issues or the pull requests will never be closed automatically.\n\nThe label used to stale is defined by these two options:\n\n- [stale-issue-label](#stale-issue-label)\n- [stale-pr-label](#stale-pr-label)\n\nDefault value: `7`\n\n#### days-before-issue-close\n\nOverride [days-before-close](#days-before-close) but only for the idle number of days before closing the stale issues.\n\nDefault value: unset\n\n#### days-before-pr-close\n\nOverride [days-before-close](#days-before-close) but only for the idle number of days before closing the stale pull requests.\n\nDefault value: unset\n\n#### stale-issue-message\n\nThe message that will be added as a comment to the issues when the stale workflow marks it automatically as stale with a label.\n\nYou can skip the comment sending by passing an empty string.\n\nDefault value: unset  \nRequired Permission: `issues: write`\n\n#### stale-pr-message\n\nThe message that will be added as a comment to the pull requests when the stale workflow marks it automatically as stale with a label.\n\nYou can skip the comment sending by passing an empty string.\n\nDefault value: unset  \nRequired Permission: `pull-requests: write`\n\n#### close-issue-message\n\nThe message that will be added as a comment to the issues when the stale workflow closes it automatically after being stale for too long.\n\nDefault value: unset  \nRequired Permission: `issues: write`\n\n#### close-pr-message\n\nThe message that will be added as a comment to the pull requests when the stale workflow closes it automatically after being stale for too long.\n\nDefault value: unset  \nRequired Permission: `pull-requests: write`\n\n#### stale-issue-label\n\nThe label that will be added to the issues when automatically marked as stale.  \nIf you wish to speedup the stale workflow for the issues, you can add this label manually to mark as stale.\n\nDefault value: `Stale`  \nRequired Permission: `issues: write`\n\n#### close-issue-label\n\nThe label that will be added to the issues when closed automatically.  \nIt will be automatically removed if the issues are no longer closed nor locked.\n\nDefault value: unset  \nRequired Permission: `issues: write`\n\n#### close-issue-reason\n\nSpecify the [reason](https://github.blog/changelog/2022-05-19-the-new-github-issues-may-19th-update/) used when closing issues. Valid values are `completed` and `not_planned`.\n\nDefault value: `not_planned`\n\n#### stale-pr-label\n\nThe label that will be added to the pull requests when automatically marked as stale.  \nIf you wish to speedup the stale workflow for the pull requests, you can add this label manually to mark as stale.\n\nDefault value: `Stale`  \nRequired Permission: `pull-requests: write`\n\n#### close-pr-label\n\nThe label that will be added to the pull requests when closed automatically.  \nIt will be automatically removed if the pull requests are no longer closed nor locked.\n\nDefault value: unset  \nRequired Permission: `pull-requests: write`\n\n#### exempt-issue-labels\n\nComma separated list of labels that can be assigned to issues to exclude them from being marked as stale\n(e.g: `question,bug`)\n\nIf unset (or an empty string), this option will not alter the stale workflow.\n\nDefault value: unset\n\n#### exempt-pr-labels\n\nComma separated list of labels that can be assigned to pull requests to exclude them from being marked as stale\n(e.g: `need-help,WIP`)\n\nIf unset (or an empty string), this option will not alter the stale workflow.\n\nDefault value: unset\n\n#### only-labels\n\nAn allow-list of label(s) to only process the issues or the pull requests that contain all these label(s).  \nIt can be a comma separated list of labels (e.g: `answered,needs-rebase`).\n\nIf unset (or an empty string), this option will not alter the stale workflow.\n\nIf you wish to only check that the issues or the pull requests contain one of these label(s), use instead [any-of-labels](#any-of-labels).\n\nDefault value: unset\n\n#### only-issue-labels\n\nOverride [only-labels](#only-labels) but only to process the issues that contain all these label(s).\n\nDefault value: unset\n\n#### only-pr-labels\n\nOverride [only-labels](#only-labels) but only to process the pull requests that contain all these label(s).\n\nDefault value: unset\n\n#### any-of-labels\n\nAn allow-list of label(s) to only process the issues or the pull requests that contain one of these label(s).  \nIt can be a comma separated list of labels (e.g: `answered,needs-rebase`).\n\nIf unset (or an empty string), this option will not alter the stale workflow.\n\nIf you wish to only check that the issues or the pull requests contain all these label(s), use instead [only-labels](#only-labels).\n\nDefault value: unset\n\n#### any-of-issue-labels\n\nOverride [any-of-labels](#any-of-labels) but only to process the issues that contain one of these label(s).\n\nDefault value: unset\n\n#### any-of-pr-labels\n\nOverride [any-of-labels](#any-of-labels) but only to process the pull requests that contain one of these label(s).\n\nDefault value: unset\n\n#### operations-per-run\n\n_Context:_  \nThis action performs some API calls to GitHub to fetch or close issues and pull requests, set or update labels, add comments, delete branches, etc.  \nThese operations are made in a very short period of time — because the action is very fast to run — and can be numerous based on your project action configuration and the quantity of issues and pull requests within it.  \nGitHub has a [rate limit](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting) and if reached will block these API calls for one hour (or API calls from other actions using the same user (a.k.a.: the github-token from the [repo-token](#repo-token) option)).  \nThis option helps you to stay within the GitHub rate limits, as you can use this option to limit the number of operations for a single run.\n\n_Purpose:_  \nThis option aims to limit the number of operations made with the GitHub API to avoid reaching the [rate limit](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting).\n\nBased on your project, your GitHub business plan and the date of the cron job you set for this action, you can increase this limit to a higher number.\nIf you are not sure which is the right value for you or if the default value is good enough, you could enable the logs and look at the end of the stale action.  \nIf you reached the limit, you will see a warning message in the logs, telling you that you should increase the number of operations.\nIf you choose not to increase the limit, you might end up with unprocessed issues or pull requests after a stale action run.\n\nWhen [debugging](#Debugging), you can set it to a much higher number like `1000` since there will be fewer operations made with the GitHub API.  \nOnly the [actor](#repo-token) and the batch of issues (100 per batch) will consume the operations.\n\nDefault value: `30`\n\n#### remove-stale-when-updated\n\nAutomatically remove the stale label when the issues or the pull requests are updated (based on [GitHub issue](https://docs.github.com/en/rest/reference/issues) field `updated_at`) or commented.\n\nDefault value: `true`  \nRequired Permission: `issues: write` and `pull-requests: write`\n\n#### remove-issue-stale-when-updated\n\nOverride [remove-stale-when-updated](#remove-stale-when-updated) but only to automatically remove the stale label when the issues are updated (based on [GitHub issue](https://docs.github.com/en/rest/reference/issues) field `updated_at`) or commented.\n\nDefault value: unset  \nRequired Permission: `issues: write`\n\n#### remove-pr-stale-when-updated\n\nOverride [remove-stale-when-updated](#remove-stale-when-updated) but only to automatically remove the stale label when the pull requests are updated (based on [GitHub issue](https://docs.github.com/en/rest/reference/issues) field `updated_at`) or commented.\n\nDefault value: unset\n\n#### labels-to-add-when-unstale\n\nA comma delimited list of labels to add when a stale issue or pull request receives activity and has the [stale-issue-label](#stale-issue-label) or [stale-pr-label](#stale-pr-label) removed from it.\n\nDefault value: unset\n\n#### labels-to-remove-when-stale\n\nA comma delimited list of labels to remove when an issue or pull request becomes stale and has the [stale-issue-label](#stale-issue-label) or [stale-pr-label](#stale-pr-label) added to it.\n\nWarning: each label results in a unique API call which can drastically consume the limit of [operations-per-run](#operations-per-run).\n\nDefault value: unset  \nRequired Permission: `pull-requests: write`\n\n#### labels-to-remove-when-unstale\n\nA comma delimited list of labels to remove when a stale issue or pull request receives activity and has the [stale-issue-label](#stale-issue-label) or [stale-pr-label](#stale-pr-label) removed from it.\n\nWarning: each label results in a unique API call which can drastically consume the limit of [operations-per-run](#operations-per-run).\n\nDefault value: unset  \nRequired Permission: `pull-requests: write`\n\n#### debug-only\n\nRun the stale workflow as dry-run.  \nNo GitHub API calls that can alter your issues and pull requests will happen.  \nUseful to debug or when you want to configure the stale workflow safely.\n\nDefault value: `false`\n\n#### ascending\n\nChange the order used to fetch the issues and pull requests from GitHub:\n\n- `true` is for ascending.\n- `false` is for descending.\n\nIt can be useful if your repository is processing so many issues and pull requests that you reach the [operations-per-run](#operations-per-run) limit.  \nBased on the order, you could prefer to focus on the new content or on the old content of your repository.\n\nDefault value: `false`\n\n#### start-date\n\nThe start date is used to ignore the issues and pull requests created before the start date.  \nParticularly useful when you wish to add this stale workflow on an existing repository and only wish to stale the new issues and pull requests.\n\nIf set, the date must be formatted following the `ISO 8601` or `RFC 2822` standard.\n\nDefault value: unset\n\n#### delete-branch\n\nIf set to `true`, the stale workflow will automatically delete the GitHub branches related to the pull requests automatically closed by the stale workflow.\n\nDefault value: `false`  \nRequired Permission: `pull-requests: write` and `contents: write`\n\n#### exempt-milestones\n\nA white-list of milestone(s) to only process the issues or the pull requests that does not contain one of these milestone(s).  \nIt can be a comma separated list of milestones (e.g: `V1,next`).\n\nIf unset (or an empty string), this option will not alter the stale workflow.\n\nDefault value: unset\n\n#### exempt-issue-milestones\n\nOverride [exempt-milestones](#exempt-milestones) but only to process the issues that does not contain one of these milestone(s).\n\nDefault value: unset\n\n#### exempt-pr-milestones\n\nOverride [exempt-milestones](#exempt-milestones) but only to process the pull requests that does not contain one of these milestone(s).\n\nDefault value: unset\n\n#### exempt-all-milestones\n\nIf set to `true`, the issues or the pull requests with a milestone will not be marked as stale automatically.\n\nPriority over [exempt-milestones](#exempt-milestones).\n\nDefault value: `false`\n\n#### exempt-all-issue-milestones\n\nOverride [exempt-all-milestones](#exempt-all-milestones) but only to exempt the issues with a milestone to be marked as stale automatically.\n\nDefault value: unset\n\n#### exempt-all-pr-milestones\n\nOverride [exempt-all-milestones](#exempt-all-milestones) but only to exempt the pull requests with a milestone to be marked as stale automatically.\n\nDefault value: unset\n\n#### exempt-assignees\n\nAn allow-list of assignee(s) to only process the issues or the pull requests that does not contain one of these assignee(s).  \nIt can be a comma separated list of assignees (e.g: `marco,polo`).\n\nIf unset (or an empty string), this option will not alter the stale workflow.\n\nDefault value: unset\n\n#### exempt-issue-assignees\n\nOverride [exempt-assignees](#exempt-assignees) but only to process the issues that does not contain one of these assignee(s).\n\nDefault value: unset\n\n#### exempt-pr-assignees\n\nOverride [exempt-assignees](#exempt-assignees) but only to process the pull requests that does not contain one of these assignee(s).\n\nDefault value: unset\n\n#### exempt-all-assignees\n\nIf set to `true`, the issues or the pull requests with an assignee will not be marked as stale automatically.\n\nPriority over [exempt-assignees](#exempt-assignees).\n\nDefault value: `false`\n\n#### exempt-all-issue-assignees\n\nOverride [exempt-all-assignees](#exempt-all-assignees) but only to exempt the issues with an assignee to be marked as stale automatically.\n\nDefault value: unset\n\n#### exempt-all-pr-assignees\n\nOverride [exempt-all-assignees](#exempt-all-assignees) but only to exempt the pull requests with an assignee to be marked as stale automatically.\n\nDefault value: unset\n\n#### exempt-draft-pr\n\nIf set to `true`, the pull requests currently in draft will not be marked as stale automatically.  \n⚠️ This option consume one operation per pull request to process because we need to fetch the pull request with the GitHub API to know if it's a draft one or not.\n\nDefault value: `false`  \nRequired Permission: `pull-requests: read`\n\n#### enable-statistics\n\nCollects and display statistics at the end of the stale workflow logs to get a summary of what happened during the run.  \nThis option is only useful if the debug output secret `ACTIONS_STEP_DEBUG` is set to `true` in your repository to display the logs.\n\nDefault value: `true`\n\n#### ignore-updates\n\nThe option [days-before-stale](#days-before-stale) will define the number of days before considering the issues or the pull requests as stale.  \nIn most cases, the purpose of this action is to only stale when necessary so if any update occurs or if a comment is added to them, the counter will restart.  \nNonetheless, if you don't care about this, and you prefer to stick to this number of days no matter the update, you can enable this option.  \nInstead of comparing the number of days based on the [GitHub issue](https://docs.github.com/en/rest/reference/issues) field `updated_at`, it will be based on the [GitHub issue](https://docs.github.com/en/rest/reference/issues) field `created_at`.\n\nDefault value: `false`\n\n#### ignore-issue-updates\n\nUseful to override [ignore-updates](#ignore-updates) but only to ignore the updates for the issues.\n\nDefault value: unset\n\n#### ignore-pr-updates\n\nUseful to override [ignore-updates](#ignore-updates) but only to ignore the updates for the pull requests.\n\nDefault value: unset\n\n#### include-only-assigned\n\nIf set to `true`, only the issues or the pull requests with an assignee will be marked as stale automatically.\n\nDefault value: `false`\n\n### Usage\n\nSee also [action.yml](./action.yml) for a comprehensive list of all the options.\n\nBasic:\n\n```yaml\nname: 'Close stale issues and PRs'\non:\n  schedule:\n    - cron: '30 1 * * *'\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/stale@v9\n        with:\n          stale-issue-message: 'Message to comment on stale issues. If none provided, will not mark issues stale'\n          stale-pr-message: 'Message to comment on stale PRs. If none provided, will not mark PRs stale'\n```\n\nConfigure stale timeouts:\n\n```yaml\nname: 'Close stale issues and PRs'\non:\n  schedule:\n    - cron: '30 1 * * *'\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/stale@v9\n        with:\n          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 5 days.'\n          days-before-stale: 30\n          days-before-close: 5\n```\n\nConfigure different stale timeouts but never close a PR:\n\n```yaml\nname: 'Close stale issues and PR'\non:\n  schedule:\n    - cron: '30 1 * * *'\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/stale@v9\n        with:\n          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 5 days.'\n          stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'\n          close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'\n          days-before-stale: 30\n          days-before-close: 5\n          days-before-pr-close: -1\n```\n\nConfigure different stale timeouts:\n\n```yaml\nname: 'Close stale issues and PRs'\non:\n  schedule:\n    - cron: '30 1 * * *'\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/stale@v9\n        with:\n          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 5 days.'\n          stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'\n          close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'\n          close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.'\n          days-before-issue-stale: 30\n          days-before-pr-stale: 45\n          days-before-issue-close: 5\n          days-before-pr-close: 10\n```\n\nConfigure labels:\n\n```yaml\nname: 'Close stale issues and PRs'\non:\n  schedule:\n    - cron: '30 1 * * *'\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/stale@v9\n        with:\n          stale-issue-message: 'Stale issue message'\n          stale-pr-message: 'Stale pull request message'\n          stale-issue-label: 'no-issue-activity'\n          exempt-issue-labels: 'awaiting-approval,work-in-progress'\n          stale-pr-label: 'no-pr-activity'\n          exempt-pr-labels: 'awaiting-approval,work-in-progress'\n          only-labels: 'awaiting-feedback,awaiting-answers'\n```\n\nConfigure the stale action to only stale issue/PR created after the 18th april 2020:\n\n```yaml\nname: 'Close stale issues and PRs'\non:\n  schedule:\n    - cron: '30 1 * * *'\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/stale@v9\n        with:\n          start-date: '2020-04-18T00:00:00Z' # ISO 8601 or RFC 2822\n```\n\nAvoid stale for specific milestones:\n\n```yaml\nname: 'Close stale issues and PRs'\non:\n  schedule:\n    - cron: '30 1 * * *'\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/stale@v9\n        with:\n          exempt-issue-milestones: 'future,alpha,beta'\n          exempt-pr-milestones: 'bugfix,improvement'\n```\n\nAvoid stale for all PR with milestones:\n\n```yaml\nname: 'Close stale issues and PRs'\non:\n  schedule:\n    - cron: '30 1 * * *'\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/stale@v9\n        with:\n          exempt-all-pr-milestones: true\n```\n\nCheck stale for specific labels:\n\n```yaml\nname: 'Close stale issues and PRs'\non:\n  schedule:\n    - cron: '30 1 * * *'\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/stale@v9\n        with:\n          any-of-labels: 'needs-more-info,needs-demo'\n          # You can opt for 'only-labels' instead if your use-case requires all labels\n          # to be present in the issue/PR\n```\n\nAvoid stale for specific assignees:\n\n```yaml\nname: 'Close stale issues and PRs'\non:\n  schedule:\n    - cron: '30 1 * * *'\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/stale@v9\n        with:\n          exempt-issue-assignees: 'marco,polo'\n          exempt-pr-assignees: 'marco'\n```\n\nAvoid stale for all PR with assignees:\n\n```yaml\nname: 'Close stale issues and PRs'\non:\n  schedule:\n    - cron: '30 1 * * *'\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/stale@v9\n        with:\n          exempt-all-pr-assignees: true\n```\n\n### Debugging\n\n**Logs:**  \nTo see the debug output from this action, you must set the secret `ACTIONS_STEP_DEBUG` to `true` in your repository.  \nThere are many logs, so this can be very helpful!\n\n**Statistics:**  \nIf the logs are enabled, you can also enable the statistics log which will be visible at the end of the logs once all issues were processed.  \nThis is very helpful to have a quick understanding of the whole stale workflow.  \nSet `enable-statistics` to `true` in your workflow configuration file.\n\n**Dry-run:**  \nYou can run this action in debug only mode (no actions will be taken on your issues and pull requests) by passing `debug-only` to `true` as an argument to the action.\n\n**More operations:**  \nYou can increase the maximum number of operations per run by passing `operations-per-run` to `1000` for example which will help you to handle more operations in a single stale workflow run.  \nIf the `debug-only` option is enabled, this is very helpful because the workflow will (almost) never reach the GitHub API rate, and you will be able to deep-dive into the logs.\n\n**Job frequency:**  \nYou could change the cron job frequency in the stale workflow to run the stale workflow more often.  \nUsually, this is not very helpful though.\n\n### Contributing\n\nWe welcome contributions!\nPlease read the [contributing](CONTRIBUTING.md) file before starting your work.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions%2Fstale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factions%2Fstale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions%2Fstale/lists"}