Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃摑 Add requested permissions #492

Merged
merged 9 commits into from Jun 14, 2021
50 changes: 38 additions & 12 deletions README.md
Expand Up @@ -8,6 +8,20 @@ The default configuration will:
- Close the stale issues and pull requests after 7 days of inactivity
- If an update/comment occur on stale issues or pull requests, the stale label will be removed and the timer will restart

## Recommended permissions

For the execution of this action, it must be able to fetch all issues and pull requests from your repository.
This 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:

```yaml
permissions:
issues: read
pull-requests: read
```

In addition, based on the provided configuration, the action could require more permission(s) (e.g.: add label, remove label, comment, close, etc).
You can find more information about the required permissions under the corresponding options that you wish to use.
flaxel marked this conversation as resolved.
Show resolved Hide resolved

## All options

### List of input options
Expand Down Expand Up @@ -154,55 +168,63 @@ The message that will be added as a comment to the issues when the stale workflo

You can skip the comment sending by omitting the option or by passing an empty string.

Default value: unset
Default value: unset
Required Permission: `issues: write`

#### stale-pr-message

The message that will be added as a comment to the pull requests when the stale workflow marks it automatically as stale with a label.

You can skip the comment sending by omitting the option or by passing an empty string.

Default value: unset
Default value: unset
Required Permission: `pull-requests: write`

#### close-issue-message

The message that will be added as a comment to the issues when the stale workflow closes it automatically after being stale for too long.

Default value: unset
Default value: unset
Required Permission: `issues: write`

#### close-pr-message

The 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.

Default value: unset
Default value: unset
Required Permission: `pull-requests: write`

#### stale-issue-label

The label that will be added to the issues when automatically marked as stale.
If you wish to speedup the stale workflow for the issues, you can add this label manually to mark as stale.

Default value: `Stale`
Default value: `Stale`
Required Permission: `issues: write`

#### close-issue-label

The label that will be added to the issues when closed automatically.
It will be automatically removed if the issues are no longer closed nor locked.

Default value: unset
Default value: unset
Required Permission: `issues: write`

#### stale-pr-label

The label that will be added to the pull requests when automatically marked as stale.
If you wish to speedup the stale workflow for the pull requests, you can add this label manually to mark as stale.

Default value: `Stale`
Default value: `Stale`
Required Permission: `pull-requests: write`

#### close-pr-label

The label that will be added to the pull requests when closed automatically.
It will be automatically removed if the pull requests are no longer closed nor locked.

Default value: unset
Default value: unset
Required Permission: `pull-requests: write`

#### exempt-issue-labels

Expand Down Expand Up @@ -293,19 +315,22 @@ Default value: `30`

Automatically 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.

Default value: `true`
Default value: `true`
Required Permission: `issues: write` and `pull-requests: write`

#### remove-issue-stale-when-updated

Override [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.

Default value: unset
Default value: unset
Required Permission: `issues: write`

#### remove-pr-stale-when-updated

Override [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.

Default value: unset
Default value: unset
Required Permission: `pull-requests: write`

#### debug-only

Expand Down Expand Up @@ -340,7 +365,8 @@ Default value: unset

If set to `true`, the stale workflow will automatically delete the GitHub branches related to the pull requests automatically closed by the stale workflow.

Default value: `false`
Default value: `false`
Required Permission: `pull-requests: write`

#### exempt-milestones

Expand Down