diff --git a/action.yml b/action.yml index b2bb534d..c174b97d 100644 --- a/action.yml +++ b/action.yml @@ -25,6 +25,9 @@ inputs: default: 'Stale' exempt-pr-label: description: 'The label to apply when a pull request is exempt from being marked stale' + only-labels: + description: 'The labels to apply when only specific issues/pull requests to mark as stale' + default: '' operations-per-run: description: 'The maximum number of operations per run, used to control rate limiting' default: 30 diff --git a/src/main.ts b/src/main.ts index b24d6287..d5c614ed 100644 --- a/src/main.ts +++ b/src/main.ts @@ -15,6 +15,7 @@ type Args = { exemptIssueLabel: string; stalePrLabel: string; exemptPrLabel: string; + onlyLabels: string; operationsPerRun: number; }; @@ -40,6 +41,7 @@ async function processIssues( owner: github.context.repo.owner, repo: github.context.repo.repo, state: 'open', + labels: args.onlyLabels, per_page: 100, page: page }); @@ -159,6 +161,7 @@ function getAndValidateArgs(): Args { exemptIssueLabel: core.getInput('exempt-issue-label'), stalePrLabel: core.getInput('stale-pr-label', {required: true}), exemptPrLabel: core.getInput('exempt-pr-label'), + onlyLabels: core.getInput('only-labels'), operationsPerRun: parseInt( core.getInput('operations-per-run', {required: true}) )