feat(options): add new options to avoid stale base on comments (#494)

* feat(options): add new options to avoid stale based on comments

Helping to close #441, #470, #435?
Closes #390 due to no activity

BREAKING CHANGES: the options related to remove-stale-when-updated will only check the updates, not the comment. It is only impactint the configurations using the value at false

* style(readme): fix table syntax due to rebase

* docs(readme): add permissions only for the new options
This commit is contained in:
Geoffrey Testelin
2021-06-14 15:56:55 +02:00
committed by GitHub
parent f1017f33dd
commit 1efddcbe9f
12 changed files with 827 additions and 79 deletions

View File

@@ -62,6 +62,15 @@ function _getAndValidateArgs(): IIssuesProcessorOptions {
removePrStaleWhenUpdated: _toOptionalBoolean(
core.getInput('remove-pr-stale-when-updated')
),
removeStaleWhenCommented: !(
core.getInput('remove-stale-when-commented') === 'false'
),
removeIssueStaleWhenCommented: _toOptionalBoolean(
core.getInput('remove-issue-stale-when-commented')
),
removePrStaleWhenCommented: _toOptionalBoolean(
core.getInput('remove-pr-stale-when-commented')
),
debugOnly: core.getInput('debug-only') === 'true',
ascending: core.getInput('ascending') === 'true',
deleteBranch: core.getInput('delete-branch') === 'true',