Add only-labels
This commit is contained in:
parent
08796943dd
commit
8588c16319
|
@ -25,6 +25,9 @@ inputs:
|
||||||
default: 'Stale'
|
default: 'Stale'
|
||||||
exempt-pr-label:
|
exempt-pr-label:
|
||||||
description: 'The label to apply when a pull request is exempt from being marked stale'
|
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:
|
operations-per-run:
|
||||||
description: 'The maximum number of operations per run, used to control rate limiting'
|
description: 'The maximum number of operations per run, used to control rate limiting'
|
||||||
default: 30
|
default: 30
|
||||||
|
|
|
@ -15,6 +15,7 @@ type Args = {
|
||||||
exemptIssueLabel: string;
|
exemptIssueLabel: string;
|
||||||
stalePrLabel: string;
|
stalePrLabel: string;
|
||||||
exemptPrLabel: string;
|
exemptPrLabel: string;
|
||||||
|
onlyLabels: string;
|
||||||
operationsPerRun: number;
|
operationsPerRun: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -40,6 +41,7 @@ async function processIssues(
|
||||||
owner: github.context.repo.owner,
|
owner: github.context.repo.owner,
|
||||||
repo: github.context.repo.repo,
|
repo: github.context.repo.repo,
|
||||||
state: 'open',
|
state: 'open',
|
||||||
|
labels: args.onlyLabels,
|
||||||
per_page: 100,
|
per_page: 100,
|
||||||
page: page
|
page: page
|
||||||
});
|
});
|
||||||
|
@ -159,6 +161,7 @@ function getAndValidateArgs(): Args {
|
||||||
exemptIssueLabel: core.getInput('exempt-issue-label'),
|
exemptIssueLabel: core.getInput('exempt-issue-label'),
|
||||||
stalePrLabel: core.getInput('stale-pr-label', {required: true}),
|
stalePrLabel: core.getInput('stale-pr-label', {required: true}),
|
||||||
exemptPrLabel: core.getInput('exempt-pr-label'),
|
exemptPrLabel: core.getInput('exempt-pr-label'),
|
||||||
|
onlyLabels: core.getInput('only-labels'),
|
||||||
operationsPerRun: parseInt(
|
operationsPerRun: parseInt(
|
||||||
core.getInput('operations-per-run', {required: true})
|
core.getInput('operations-per-run', {required: true})
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue