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
36 changes: 36 additions & 0 deletions README.md
Expand Up @@ -8,6 +8,18 @@ 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 the action, it must be able to read all issues and pull requests. In addition, the action must have the permission to write to issues and/or pull requests. 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:

```yml
permissions:
issues: write
pull-requests: write
```

You can find more detailed information about the required permissions under the corresponding options.
flaxel marked this conversation as resolved.
Show resolved Hide resolved

## All options

### List of input options
Expand Down Expand Up @@ -156,6 +168,8 @@ You can skip the comment sending by omitting the option or by passing an empty s

Default value: unset

Required Permission: `issues: write`
flaxel marked this conversation as resolved.
Show resolved Hide resolved

#### 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.
Expand All @@ -164,46 +178,60 @@ You can skip the comment sending by omitting the option or by passing an empty s

Default value: unset

Required Permission:`pull-requests: write`
flaxel marked this conversation as resolved.
Show resolved Hide resolved

#### 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

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

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`

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

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`

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

Required Permission: `pull-requests: write`

#### exempt-issue-labels

The label(s) that can exempt to automatically mark as stale the issues.
Expand Down Expand Up @@ -295,18 +323,24 @@ Automatically remove the stale label when the issues or the pull requests are up

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

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

Required Permission: `pull-requests: write`

#### debug-only

Run the stale workflow as dry-run.
Expand Down Expand Up @@ -342,6 +376,8 @@ If set to `true`, the stale workflow will automatically delete the GitHub branch

Default value: `false`

Required Permission: `pull-requests: write`

#### exempt-milestones

A white-list of milestone(s) to only process the issues or the pull requests that does not contain one of these milestone(s).
Expand Down