Merge pull request #22 from yuya-takeyama/only-labels-pr
Add only-labels option
This commit is contained in:
commit
3d5d474504
|
@ -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: 'Only issues or pull requests with all of these labels are checked if stale. Defaults to `[]` (disabled)' and can be a comma-separated list of labels
|
||||
default: ''
|
||||
operations-per-run:
|
||||
description: 'The maximum number of operations per run, used to control rate limiting'
|
||||
default: 30
|
||||
|
|
|
@ -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})
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue