docs(only-labels): enhance the docs and fix duplicate (#341)

* docs(only-labels): remove duplicated option and improve descriptions

a bad rebase happend

* docs(readme): use a multi-line array and remove the optional column

the option column was not helpful since each value is optional
the multi-line array will allow to have a better UI in small devices and basically in GitHub too due to the max-width

* style(readme): break line for the statistics

* docs(readme): add a better description for the ascending option

* docs(action): add missing punctuation
This commit is contained in:
Geoffrey Testelin 2021-03-04 12:38:05 +01:00 committed by GitHub
parent 419a53bc05
commit ba1c02f61a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 51 deletions

View File

@ -4,51 +4,52 @@ Warns and then closes issues and PRs that have had no activity for a specified a
### Arguments ### Arguments
| Input | Description | Usage | Every argument is optional.
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -------- |
| `repo-token` | PAT(Personal Access Token) for authorizing repository. _Defaults to **${{ github.token }}**_ | Optional | | Input | Description |
| `days-before-stale` | Idle number of days before marking an issue/PR as stale. _Defaults to **60**_ | Optional | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `days-before-issue-stale` | Idle number of days before marking an issue as stale (override `days-before-stale`). | Optional | | `repo-token` | PAT(Personal Access Token) for authorizing repository.<br>_Defaults to **${{ github.token }}**_. |
| `days-before-pr-stale` | Idle number of days before marking an PR as stale (override `days-before-stale`). | Optional | | `days-before-stale` | Idle number of days before marking an issue/PR as stale.<br>_Defaults to **60**_. |
| `days-before-close` | Idle number of days before closing an stale issue/PR. _Defaults to **7**_ | Optional | | `days-before-issue-stale` | Idle number of days before marking an issue as stale.<br>_Override `days-before-stale`_. |
| `days-before-issue-close` | Idle number of days before closing an stale issue (override `days-before-close`). | Optional | | `days-before-pr-stale` | Idle number of days before marking an PR as stale.<br>_Override `days-before-stale`_. |
| `days-before-pr-close` | Idle number of days before closing an stale PR (override `days-before-close`). | Optional | | `days-before-close` | Idle number of days before closing an stale issue/PR.<br>_Defaults to **7**_. |
| `stale-issue-message` | Message to post on the stale issue. | Optional | | `days-before-issue-close` | Idle number of days before closing an stale issue.<br>_Override `days-before-close`_. |
| `stale-pr-message` | Message to post on the stale PR. | Optional | | `days-before-pr-close` | Idle number of days before closing an stale PR.<br>_Override `days-before-close`_. |
| `close-issue-message` | Message to post on the stale issue while closing it. | Optional | | `stale-issue-message` | Message to post on the stale issue. |
| `close-pr-message` | Message to post on the stale PR while closing it. | Optional | | `stale-pr-message` | Message to post on the stale PR. |
| `stale-issue-label` | Label to apply on the stale issue. _Defaults to **Stale**_ | Optional | | `close-issue-message` | Message to post on the stale issue while closing it. |
| `close-issue-label` | Label to apply on closing issue (automatically removed if no longer closed nor locked). | Optional | | `close-pr-message` | Message to post on the stale PR while closing it. |
| `stale-pr-label` | Label to apply on the stale PR. _Defaults to **Stale**_ | Optional | | `stale-issue-label` | Label to apply on the stale issue.<br>_Defaults to **Stale**_. |
| `close-pr-label` | Label to apply on the closing PR (automatically removed if no longer closed nor locked). | Optional | | `close-issue-label` | Label to apply on closing issue (automatically removed if no longer closed nor locked). |
| `exempt-issue-labels` | Labels on an issue exempted from being marked as stale. | Optional | | `stale-pr-label` | Label to apply on the stale PR.<br>_Defaults to **Stale**_. |
| `exempt-pr-labels` | Labels on the PR exempted from being marked as stale. | Optional | | `close-pr-label` | Label to apply on the closing PR (automatically removed if no longer closed nor locked). |
| `only-labels` | Only issues and PRs with ALL these labels are checked. Separate multiple labels with commas (eg. "question,answered"). | Optional | | `exempt-issue-labels` | Labels on an issue exempted from being marked as stale. |
| `only-labels` | Only labels checked for stale issue/PR. | Optional | | `exempt-pr-labels` | Labels on the PR exempted from being marked as stale. |
| `only-issue-labels` | Only labels checked for stale issue (override `only-labels`). | Optional | | `only-labels` | Only issues and PRs with ALL these labels are checked. Separate multiple labels with commas (eg. "question,answered"). |
| `only-pr-labels` | Only labels checked for stale PR (override `only-labels`). | Optional | | `only-issue-labels` | Only issues with ALL these labels are checked. Separate multiple labels with commas (eg. "question,answered").<br>_Override `only-labels`_. |
| `any-of-labels` | Only issues and PRs with ANY of these labels are checked. Separate multiple labels with commas (eg. "incomplete,waiting-feedback"). | Optional | | `only-pr-labels` | Only PRs with ALL these labels are checked. Separate multiple labels with commas (eg. "question,answered").<br>_Override `only-labels`_. |
| `operations-per-run` | Maximum number of operations per run (GitHub API CRUD related). _Defaults to **30**_ | Optional | | `any-of-labels` | Only issues and PRs with ANY of these labels are checked. Separate multiple labels with commas (eg. "incomplete,waiting-feedback"). |
| `remove-stale-when-updated` | Remove stale label from issue/PR on updates or comments. _Defaults to **true**_ | Optional | | `operations-per-run` | Maximum number of operations per run (GitHub API CRUD related).<br>_Defaults to **30**_. |
| `debug-only` | Dry-run on action. _Defaults to **false**_ | Optional | | `remove-stale-when-updated` | Remove stale label from issue/PR on updates or comments.<br>_Defaults to **true**_. |
| `ascending` | Order to get issues/PR. _Defaults to **false**_ | Optional | | `debug-only` | Dry-run on action.<br>_Defaults to **false**_. |
| `skip-stale-issue-message` | Skip adding stale message on stale issue. _Defaults to **false**_ | Optional | | `ascending` | Order to get issues/PR (true is ascending, false is descending).<br>_Defaults to **false**_. |
| `skip-stale-pr-message` | Skip adding stale message on stale PR. _Defaults to **false**_ | Optional | | `skip-stale-issue-message` | Skip adding stale message on stale issue.<br>_Defaults to **false**_. |
| `start-date` | The date used to skip the stale action on issue/PR created before it (ISO 8601 or RFC 2822). | Optional | | `skip-stale-pr-message` | Skip adding stale message on stale PR.<br>_Defaults to **false**_. |
| `delete-branch` | Delete the git branch after closing a stale pull request. _Defaults to **false**_ | Optional | | `start-date` | The date used to skip the stale action on issue/PR created before it (ISO 8601 or RFC 2822). |
| `exempt-milestones` | Milestones on an issue or a PR exempted from being marked as stale. | Optional | | `delete-branch` | Delete the git branch after closing a stale pull request.<br>_Defaults to **false**_. |
| `exempt-issue-milestones` | Milestones on an issue exempted from being marked as stale (override `exempt-milestones`). | Optional | | `exempt-milestones` | Milestones on an issue or a PR exempted from being marked as stale. |
| `exempt-pr-milestones` | Milestones on the PR exempted from being marked as stale (override `exempt-milestones`). | Optional | | `exempt-issue-milestones` | Milestones on an issue exempted from being marked as stale.<br>_Override `exempt-milestones`_. |
| `exempt-all-milestones` | Exempt all issues and PRs with milestones from being marked as stale. (priority over `exempt-milestones` rules) | Optional | | `exempt-pr-milestones` | Milestones on the PR exempted from being marked as stale.<br>_Override `exempt-milestones`_. |
| `exempt-all-issue-milestones` | Exempt all issues with milestones from being marked as stale. (override `exempt-all-milestones`). | Optional | | `exempt-all-milestones` | Exempt all issues and PRs with milestones from being marked as stale.<br>_Priority over `exempt-milestones` rules_. |
| `exempt-all-pr-milestones` | Exempt all PRs with milestones from being marked as stale. (override `exempt-all-milestones`). | Optional | | `exempt-all-issue-milestones` | Exempt all issues with milestones from being marked as stale.<br>_Override `exempt-all-milestones`_. |
| `exempt-assignees` | Assignees on an issue or a PR exempted from being marked as stale. | Optional | | `exempt-all-pr-milestones` | Exempt all PRs with milestones from being marked as stale.<br>_Override `exempt-all-milestones`_. |
| `exempt-issue-assignees` | Assignees on an issue exempted from being marked as stale (override `exempt-assignees`). | Optional | | `exempt-assignees` | Assignees on an issue or a PR exempted from being marked as stale. |
| `exempt-pr-assignees` | Assignees on the PR exempted from being marked as stale (override `exempt-assignees`). | Optional | | `exempt-issue-assignees` | Assignees on an issue exempted from being marked as stale.<br>_Override `exempt-assignees`_. |
| `exempt-all-assignees` | Exempt all issues and PRs with assignees from being marked as stale. (priority over `exempt-assignees` rules) | Optional | | `exempt-pr-assignees` | Assignees on the PR exempted from being marked as stale.<br>_Override `exempt-assignees`_. |
| `exempt-all-issue-assignees` | Exempt all issues with assignees from being marked as stale. (override `exempt-all-assignees`). | Optional | | `exempt-all-assignees` | Exempt all issues and PRs with assignees from being marked as stale.<br>_Priority over `exempt-assignees` rules_. |
| `exempt-all-pr-assignees` | Exempt all PRs with assignees from being marked as stale. (override `exempt-all-assignees`). | Optional | | `exempt-all-issue-assignees` | Exempt all issues with assignees from being marked as stale.<br>_Override `exempt-all-assignees`_. |
| `enable-statistics` | Display some statistics at the end of the logs regarding the stale workflow (only when the logs are enabled). _Defaults to **true**_ | Optional | | `exempt-all-pr-assignees` | Exempt all PRs with assignees from being marked as stale.<br>_Override `exempt-all-assignees`_. |
| `enable-statistics` | Display some statistics at the end of the logs regarding the stale workflow (only when the logs are enabled).<br>_Defaults to **true**_. |
### Usage ### Usage
@ -274,7 +275,7 @@ jobs:
To see the debug output from this action, you must set the secret `ACTIONS_STEP_DEBUG` to `true` in your repository. To see the debug output from this action, you must set the secret `ACTIONS_STEP_DEBUG` to `true` in your repository.
There is a lot of logs so this can be very helpful! There is a lot of logs so this can be very helpful!
**Statistics:** **Statistics:**
If 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. If 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.
This is very helpful to have a quick understanding of the whole stale workflow. This is very helpful to have a quick understanding of the whole stale workflow.
Set `enable-statistics` to `true` in your workflow configuration file. Set `enable-statistics` to `true` in your workflow configuration file.

View File

@ -46,7 +46,7 @@ inputs:
description: 'The label to apply when an issue is closed.' description: 'The label to apply when an issue is closed.'
required: false required: false
exempt-issue-labels: exempt-issue-labels:
description: 'The labels that mean an issue is exempt from being marked stale. Separate multiple labels with commas (eg. "label1,label2")' description: 'The labels that mean an issue is exempt from being marked stale. Separate multiple labels with commas (eg. "label1,label2").'
default: '' default: ''
required: false required: false
stale-pr-label: stale-pr-label:
@ -57,11 +57,11 @@ inputs:
description: 'The label to apply when a pull request is closed.' description: 'The label to apply when a pull request is closed.'
required: false required: false
exempt-pr-labels: exempt-pr-labels:
description: 'The labels that mean a pull request is exempt from being marked as stale. Separate multiple labels with commas (eg. "label1,label2")' description: 'The labels that mean a pull request is exempt from being marked as stale. Separate multiple labels with commas (eg. "label1,label2").'
default: '' default: ''
required: false required: false
exempt-milestones: exempt-milestones:
description: 'The milestones that mean an issue or a pull request is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2")' description: 'The milestones that mean an issue or a pull request is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2").'
default: '' default: ''
required: false required: false
exempt-issue-milestones: exempt-issue-milestones:
@ -113,7 +113,7 @@ inputs:
default: 'false' default: 'false'
required: false required: false
ascending: ascending:
description: 'The order to get issues or pull requests. Defaults to false, which is descending' description: 'The order to get issues or pull requests. Defaults to false, which is descending.'
default: 'false' default: 'false'
required: false required: false
skip-stale-pr-message: skip-stale-pr-message:
@ -133,7 +133,7 @@ inputs:
default: '' default: ''
required: false required: false
exempt-assignees: exempt-assignees:
description: 'The assignees which exempt an issue or a pull request from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2")' description: 'The assignees which exempt an issue or a pull request from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2").'
default: '' default: ''
required: false required: false
exempt-issue-assignees: exempt-issue-assignees: