mirror of
https://github.com/actions/stale.git
synced 2025-12-10 12:07:09 +00:00
feat: remove the any-of-labels option
BREAKING CHANGE: The option any-of-labels was removed
This commit is contained in:
@@ -30,7 +30,6 @@ describe('Issue', (): void => {
|
||||
onlyLabels: '',
|
||||
onlyIssueLabels: '',
|
||||
onlyPrLabels: '',
|
||||
anyOfLabels: '',
|
||||
anyOfIssueLabels: '',
|
||||
anyOfPrLabels: '',
|
||||
operationsPerRun: 0,
|
||||
|
||||
@@ -345,7 +345,7 @@ export class IssuesProcessor {
|
||||
if (anyOfLabels.length > 0) {
|
||||
issueLogger.info(
|
||||
`The option ${issueLogger.createOptionLink(
|
||||
Option.AnyOfLabels
|
||||
issue.isPullRequest ? Option.AnyOfPrLabels : Option.AnyOfIssueLabels
|
||||
)} was specified to only process the issues and pull requests with one of those labels (${LoggerService.cyan(
|
||||
anyOfLabels.length
|
||||
)})`
|
||||
@@ -377,7 +377,7 @@ export class IssuesProcessor {
|
||||
} else {
|
||||
issueLogger.info(
|
||||
`The option ${issueLogger.createOptionLink(
|
||||
Option.AnyOfLabels
|
||||
issue.isPullRequest ? Option.AnyOfPrLabels : Option.AnyOfIssueLabels
|
||||
)} was not specified`
|
||||
);
|
||||
issueLogger.info(
|
||||
@@ -997,16 +997,10 @@ export class IssuesProcessor {
|
||||
|
||||
private _getAnyOfLabels(issue: Issue): string {
|
||||
if (issue.isPullRequest) {
|
||||
if (this.options.anyOfPrLabels !== '') {
|
||||
return this.options.anyOfPrLabels;
|
||||
}
|
||||
} else {
|
||||
if (this.options.anyOfIssueLabels !== '') {
|
||||
return this.options.anyOfIssueLabels;
|
||||
}
|
||||
return this.options.anyOfPrLabels;
|
||||
}
|
||||
|
||||
return this.options.anyOfLabels;
|
||||
return this.options.anyOfIssueLabels;
|
||||
}
|
||||
|
||||
private _shouldRemoveStaleWhenUpdated(issue: Issue): boolean {
|
||||
|
||||
@@ -19,7 +19,8 @@ export enum Option {
|
||||
OnlyLabels = 'only-labels',
|
||||
OnlyIssueLabels = 'only-issue-labels',
|
||||
OnlyPrLabels = 'only-pr-labels',
|
||||
AnyOfLabels = 'any-of-labels',
|
||||
AnyOfIssueLabels = 'any-of-issue-labels',
|
||||
AnyOfPrLabels = 'any-of-pr-labels',
|
||||
OperationsPerRun = 'operations-per-run',
|
||||
RemoveStaleWhenUpdated = 'remove-stale-when-updated',
|
||||
RemoveIssueStaleWhenUpdated = 'remove-issue-stale-when-updated',
|
||||
|
||||
@@ -21,7 +21,6 @@ export interface IIssuesProcessorOptions {
|
||||
onlyLabels: string;
|
||||
onlyIssueLabels: string;
|
||||
onlyPrLabels: string;
|
||||
anyOfLabels: string;
|
||||
anyOfIssueLabels: string;
|
||||
anyOfPrLabels: string;
|
||||
operationsPerRun: number;
|
||||
|
||||
@@ -47,7 +47,6 @@ function _getAndValidateArgs(): IIssuesProcessorOptions {
|
||||
onlyLabels: core.getInput('only-labels'),
|
||||
onlyIssueLabels: core.getInput('only-issue-labels'),
|
||||
onlyPrLabels: core.getInput('only-pr-labels'),
|
||||
anyOfLabels: core.getInput('any-of-labels'),
|
||||
anyOfIssueLabels: core.getInput('any-of-issue-labels'),
|
||||
anyOfPrLabels: core.getInput('any-of-pr-labels'),
|
||||
operationsPerRun: parseInt(
|
||||
|
||||
Reference in New Issue
Block a user