diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c051e26ee..352d44521 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ Install the dependencies. $ npm install ``` -Build the typescript and package it for distribution. +Build the TypeScript and package it for distribution. ```bash $ npm run build && npm run pack @@ -51,7 +51,7 @@ Be sure to commit the result of: ```bash $ npm run pack ``` -Otherwise PR checks will fail. +Otherwise, PR checks will fail. # Release @@ -62,7 +62,7 @@ Based on [standard-version](https://github.com/conventional-changelog/standard-v You can run `npm run release:dry-run` to create a dry-run, or you can directly run `npm run release` to create a new local release. It will run `prerelease` beforehand to build and pack everything. -If the `prerelease` succeeded, a bump of version will happen based on the unreleased commits. +If the `prerelease` succeeded, the version will be bumped based on the unreleased commits. It will: - Update the _package.json_ version field diff --git a/README.md b/README.md index 4710e9478..3c7c94e40 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Breaking changes in V10 -- Upgraded action from node20 to node 24 +- Upgraded the action from Node.js 20 to Node.js 24 > Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release. [Release Notes](https://github.com/actions/runner/releases/tag/v2.327.1) For more details, see the full release notes on the [release page](https://github.com/actions/stale/releases/tag/v10.0.0) @@ -270,7 +270,7 @@ Required Permission: `pull-requests: write` #### exempt-issue-labels -Comma separated list of labels that can be assigned to issues to exclude them from being marked as stale +Comma-separated list of labels that can be assigned to issues to exclude them from being marked as stale (e.g: `question,bug`) If unset (or an empty string), this option will not alter the stale workflow. @@ -279,7 +279,7 @@ Default value: unset #### exempt-pr-labels -Comma separated list of labels that can be assigned to pull requests to exclude them from being marked as stale +Comma-separated list of labels that can be assigned to pull requests to exclude them from being marked as stale (e.g: `need-help,WIP`) If unset (or an empty string), this option will not alter the stale workflow. @@ -289,7 +289,7 @@ Default value: unset #### only-labels An allow-list of label(s) to only process the issues or the pull requests that contain all these label(s). -It can be a comma separated list of labels (e.g: `answered,needs-rebase`). +It can be a comma-separated list of labels (e.g: `answered,needs-rebase`). If unset (or an empty string), this option will not alter the stale workflow. @@ -312,7 +312,7 @@ Default value: unset #### any-of-labels An allow-list of label(s) to only process the issues or the pull requests that contain one of these label(s). -It can be a comma separated list of labels (e.g: `answered,needs-rebase`). +It can be a comma-separated list of labels (e.g: `answered,needs-rebase`). If unset (or an empty string), this option will not alter the stale workflow. @@ -345,7 +345,7 @@ This option aims to limit the number of operations made with the GitHub API to a Based 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. If 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. -If you reached the limit, you will see a warning message in the logs, telling you that you should increase the number of operations. +If you reach the limit, you will see a warning message in the logs, telling you that you should increase the number of operations. If you choose not to increase the limit, you might end up with unprocessed issues or pull requests after a stale action run. When [debugging](#Debugging), you can set it to a much higher number like `1000` since there will be fewer operations made with the GitHub API. @@ -518,14 +518,14 @@ Default value: unset #### exempt-draft-pr If set to `true`, the pull requests currently in draft will not be marked as stale automatically. -⚠️ 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. +⚠️ This option consumes 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. Default value: `false` Required Permission: `pull-requests: read` #### enable-statistics -Collects and display statistics at the end of the stale workflow logs to get a summary of what happened during the run. +Collects and displays statistics at the end of the stale workflow logs to get a summary of what happened during the run. This option is only useful if the debug output secret `ACTIONS_STEP_DEBUG` is set to `true` in your repository to display the logs. Default value: `true` @@ -565,7 +565,7 @@ Default value: `created` #### only-issue-types -A comma separated list of allowed issue types. Only issues with a matching type will be processed (e.g.: `bug,question`). +A comma-separated list of allowed issue types. Only issues with a matching type will be processed (e.g.: `bug,question`). If unset (or an empty string), this option will not alter the stale workflow. diff --git a/action.yml b/action.yml index b3354e9d5..d57ac717d 100644 --- a/action.yml +++ b/action.yml @@ -1,9 +1,9 @@ -name: 'Close Stale Issues' +name: 'Close Stale Issues and Pull Requests' description: 'Close issues and pull requests with no recent activity' author: 'GitHub' inputs: repo-token: - description: 'Token for the repository. Can be passed in using `{{ secrets.GITHUB_TOKEN }}`.' + description: 'Token for the repository. Can be passed in using `${{ secrets.GITHUB_TOKEN }}`.' required: false default: ${{ github.token }} stale-issue-message: @@ -16,10 +16,10 @@ inputs: description: 'The message to post on the issue when closing it. If none provided, will not comment when closing an issue.' required: false close-pr-message: - description: 'The message to post on the pull request when closing it. If none provided, will not comment when closing a pull requests.' + description: 'The message to post on the pull request when closing it. If none provided, will not comment when closing a pull request.' required: false days-before-stale: - description: 'The number of days old an issue or a pull request can be before marking it stale. Set to -1 to never mark issues or pull requests as stale automatically.' + description: 'The number of days of inactivity before marking an issue or pull request as stale. Accepts fractional values (e.g. 0.5 for 12 hours). Set to -1 to never mark as stale automatically.' required: false default: '60' days-before-issue-stale: @@ -29,14 +29,14 @@ inputs: description: 'The number of days old a pull request can be before marking it stale. Set to -1 to never mark pull requests as stale automatically. Override "days-before-stale" option regarding only the pull requests.' required: false days-before-close: - description: 'The number of days to wait to close an issue or a pull request after it being marked stale. Set to -1 to never close stale issues or pull requests.' + description: 'The number of days to wait to close an issue or a pull request after it being marked stale. Must be an integer. Set to -1 to never close stale issues or pull requests.' required: false default: '7' days-before-issue-close: - description: 'The number of days to wait to close an issue after it being marked stale. Set to -1 to never close stale issues. Override "days-before-close" option regarding only the issues.' + description: 'The number of days to wait to close an issue after it being marked stale. Must be an integer. Set to -1 to never close stale issues. Override "days-before-close" option regarding only the issues.' required: false days-before-pr-close: - description: 'The number of days to wait to close a pull request after it being marked stale. Set to -1 to never close stale pull requests. Override "days-before-close" option regarding only the pull requests.' + description: 'The number of days to wait to close a pull request after it being marked stale. Must be an integer. Set to -1 to never close stale pull requests. Override "days-before-close" option regarding only the pull requests.' required: false stale-issue-label: description: 'The label to apply when an issue is stale.' @@ -50,7 +50,7 @@ inputs: default: '' required: false close-issue-reason: - description: 'The reason to use when closing an issue.' + description: 'The reason to use when closing an issue. Valid values are `completed` and `not_planned`. An invalid value will cause the action to fail.' default: 'not_planned' required: false stale-pr-label: @@ -77,7 +77,7 @@ inputs: default: '' required: false exempt-all-milestones: - description: 'Exempt all issues and pull requests with milestones from being marked as stale. Default to false.' + description: 'Exempt all issues and pull requests with milestones from being marked as stale. Defaults to `false`.' default: 'false' required: false exempt-all-issue-milestones: @@ -113,7 +113,7 @@ inputs: default: '' required: false operations-per-run: - description: 'The maximum number of operations per run, used to control rate limiting (GitHub API CRUD related).' + description: 'The maximum number of operations per run, used to control rate limiting (GitHub API CRUD related). Must be an integer.' default: '30' required: false remove-stale-when-updated: @@ -137,7 +137,7 @@ inputs: default: 'false' required: false sort-by: - description: 'What to sort results by. Valid options are `created`, `updated`, and `comments`. Defaults to `created`.' + description: 'What to sort results by. Valid options are `created`, `updated`, and `comments`. Any other value falls back to `created`.' default: 'created' required: false delete-branch: @@ -145,7 +145,7 @@ inputs: default: 'false' required: false start-date: - description: 'The date used to skip the stale action on issue/pull request created before it (ISO 8601 or RFC 2822).' + description: 'The date used to skip the stale action on issues and pull requests created before it (ISO 8601 or RFC 2822). An invalid date format will cause the action to fail.' default: '' required: false exempt-assignees: @@ -161,7 +161,7 @@ inputs: default: '' required: false exempt-all-assignees: - description: 'Exempt all issues and pull requests with assignees from being marked as stale. Default to false.' + description: 'Exempt all issues and pull requests with assignees from being marked as stale. Defaults to `false`.' default: 'false' required: false exempt-all-issue-assignees: @@ -173,7 +173,7 @@ inputs: default: '' required: false exempt-draft-pr: - description: 'Exempt draft pull requests from being marked as stale. Default to false.' + description: 'Exempt draft pull requests from being marked as stale. Defaults to `false`. Draft status is read from the issue list payload; no additional API call is required.' default: 'false' required: false enable-statistics: @@ -193,15 +193,15 @@ inputs: default: '' required: false ignore-updates: - description: 'Any update (update/comment) can reset the stale idle time on the issues and pull requests.' + description: 'If set to `true`, updates and comments will not reset the stale idle time. Staleness is then calculated from the creation date instead of the last update date. Defaults to `false`.' default: 'false' required: false ignore-issue-updates: - description: 'Any update (update/comment) can reset the stale idle time on the issues. Override "ignore-updates" option regarding only the issues.' + description: 'If set to `true`, updates and comments on issues will not reset the stale idle time. Staleness is then calculated from the creation date. Overrides "ignore-updates" for issues only.' default: '' required: false ignore-pr-updates: - description: 'Any update (update/comment) can reset the stale idle time on the pull requests. Override "ignore-updates" option regarding only the pull requests.' + description: 'If set to `true`, updates and comments on pull requests will not reset the stale idle time. Staleness is then calculated from the creation date. Overrides "ignore-updates" for pull requests only.' default: '' required: false include-only-assigned: @@ -213,10 +213,10 @@ inputs: default: '' required: false outputs: - closed-issues-prs: - description: 'List of all closed issues and pull requests.' staled-issues-prs: - description: 'List of all staled issues and pull requests.' + description: 'JSON array of all issues and pull requests marked stale in this run.' + closed-issues-prs: + description: 'JSON array of all issues and pull requests closed in this run.' runs: using: 'node24' main: 'dist/index.js'