Compare commits

..

2 Commits

Author SHA1 Message Date
Danny McCormick
b8e29997c6 Clean up 2019-09-05 09:57:15 -04:00
damccorm
2521dbb244 Add option to not close stale 2019-09-04 16:38:09 -04:00
2 changed files with 4 additions and 4 deletions

View File

@@ -1,9 +1,9 @@
name: 'Close Stale Issues'
description: 'Close issues and pull requests with no recent activity'
description: 'Action to close stale issues'
author: 'GitHub'
inputs:
repo-token:
description: 'Token for the repository. Can be passed in using {{ secrets.GITHUB_TOKEN }}'
description: 'Token for the repo. Can be passed in using {{ secrets.GITHUB_TOKEN }}'
required: true
stale-issue-message:
description: 'The message to post on the issue when tagging it. If none provided, will not mark issues stale.'
@@ -13,7 +13,7 @@ inputs:
description: 'The number of days old an issue can be before marking it stale'
default: 60
days-before-close:
description: 'The number of days to wait to close an issue or pull request after it being marked stale'
description: 'The number of days to wait to close an issue or pull request after it being marked stale. Set to -1 to never close stale issues.'
default: 7
stale-issue-label:
description: 'The label to apply when an issue is stale'

View File

@@ -66,7 +66,7 @@ async function processIssues(
if (exemptLabel && isLabeled(issue, exemptLabel)) {
continue;
} else if (isLabeled(issue, staleLabel)) {
if (wasLastUpdatedBefore(issue, args.daysBeforeClose)) {
if (args.daysBeforeClose >= 0 && wasLastUpdatedBefore(issue, args.daysBeforeClose)) {
operationsLeft -= await closeIssue(client, issue);
} else {
continue;