From 1b9ae0bf0b99d1e455d6b8d027da6abcae6c4d0e Mon Sep 17 00:00:00 2001 From: TESTELIN Geoffrey Date: Fri, 26 Aug 2022 23:41:27 +0200 Subject: [PATCH] feat(outputs): add new outputs `removed-issues-labels-count` and `issues-labels-count` Closes #858. --- README.md | 2 ++ action.yml | 4 +++ documentation/docs/04-all-outputs.mdx | 2 ++ .../06-issues/02-outputs/01-all-outputs.mdx | 2 ++ .../10-issues-labels-count-output.mdx | 31 +++++++++++++++++++ ...> 11-added-issues-labels-count-output.mdx} | 0 .../12-removed-issues-labels-count-output.mdx | 31 +++++++++++++++++++ ... => 13-called-api-issues-count-output.mdx} | 0 ...alled-api-issues-queries-count-output.mdx} | 0 ...led-api-issues-mutations-count-output.mdx} | 0 ...issues-outputs-annotations.service.spec.ts | 20 +++++++----- .../issues-outputs-annotations.service.ts | 6 ++++ src/core/outputs/enums/issues-outputs.enum.ts | 2 ++ .../outputs/issues-outputs.service.spec.ts | 15 +++++---- src/core/outputs/issues-outputs.service.ts | 2 ++ .../statistics/issues-statistics.service.ts | 4 +++ ...> issue-to-stale-add-extra-labels.spec.ts} | 8 ++--- 17 files changed, 111 insertions(+), 18 deletions(-) create mode 100644 documentation/docs/06-issues/02-outputs/10-issues-labels-count-output.mdx rename documentation/docs/06-issues/02-outputs/{10-added-issues-labels-count-output.mdx => 11-added-issues-labels-count-output.mdx} (100%) create mode 100644 documentation/docs/06-issues/02-outputs/12-removed-issues-labels-count-output.mdx rename documentation/docs/06-issues/02-outputs/{11-called-api-issues-count-output.mdx => 13-called-api-issues-count-output.mdx} (100%) rename documentation/docs/06-issues/02-outputs/{12-called-api-issues-queries-count-output.mdx => 14-called-api-issues-queries-count-output.mdx} (100%) rename documentation/docs/06-issues/02-outputs/{13-called-api-issues-mutations-count-output.mdx => 15-called-api-issues-mutations-count-output.mdx} (100%) rename tests/issues/{issue-to-stale-extra-labels.spec.ts => issue-to-stale-add-extra-labels.spec.ts} (91%) diff --git a/README.md b/README.md index 796a15e03..318a15c47 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,9 @@ All the inputs that are used both for issues and pull requests. | [remove-stale-issues-count](https://sonia-stale-action.vercel.app/docs/issues/outputs/remove-stale-issues-count-output) | The number of issues from where the stale state was removed. | | [close-issues-count](https://sonia-stale-action.vercel.app/docs/issues/outputs/close-issues-count-output) | The number of issues closed. | | [added-issues-comments-count](https://sonia-stale-action.vercel.app/docs/issues/outputs/added-issues-comments-count-output) | The number of added issues comments. | +| [issues-labels-count](https://sonia-stale-action.vercel.app/docs/issues/outputs/issues-labels-count-output) | The number of issues labels mutated (added or removed). | | [added-issues-labels-count](https://sonia-stale-action.vercel.app/docs/issues/outputs/added-issues-labels-count-output) | The number of added issues labels. | +| [removed-issues-labels-count](https://sonia-stale-action.vercel.app/docs/issues/outputs/removed-issues-labels-count-output) | The number of removed issues labels. | | [called-api-issues-count](https://sonia-stale-action.vercel.app/docs/issues/outputs/called-api-issues-count-output) | The number of GitHub API calls performed for the issues. | | [called-api-issues-queries-count](https://sonia-stale-action.vercel.app/docs/issues/outputs/called-api-issues-queries-count-output) | The number of GitHub API queries calls performed for the issues. | | [called-api-issues-mutations-count](https://sonia-stale-action.vercel.app/docs/issues/outputs/called-api-issues-mutations-count-output) | The number of GitHub API mutations calls performed for the issues. | diff --git a/action.yml b/action.yml index 5cfb9d453..ae904d148 100644 --- a/action.yml +++ b/action.yml @@ -267,8 +267,12 @@ outputs: description: 'The number of issues closed.' added-issues-comments-count: description: 'The number of added issues comments.' + issues-labels-count: + description: 'The number of issues labels mutated (added or removed).' added-issues-labels-count: description: 'The number of added issues labels.' + removed-issues-labels-count: + description: 'The number of removed issues labels.' called-api-issues-count: description: 'The number of GitHub API calls performed for the issues.' called-api-issues-queries-count: diff --git a/documentation/docs/04-all-outputs.mdx b/documentation/docs/04-all-outputs.mdx index 54afc6cce..5405d154c 100644 --- a/documentation/docs/04-all-outputs.mdx +++ b/documentation/docs/04-all-outputs.mdx @@ -21,7 +21,9 @@ The list of all the outputs. | [already-stale-issues-count](issues/outputs/already-stale-issues-count-output) | The number of issues processed which were already stale. | `number` | | [remove-stale-issues-count](issues/outputs/remove-stale-issues-count-output) | The number of issues from where the stale state was removed. | `number` | | [close-issues-count](issues/outputs/close-issues-count-output) | The number of issues closed. | `number` | +| [issues-comments-count](issues/outputs/issues-comments-count-output) | The number of issues labels mutated (added or removed). | `number` | | [added-issues-comments-count](issues/outputs/added-issues-comments-count-output) | The number of added issues comments. | `number` | +| [removed-issues-comments-count](issues/outputs/removed-issues-comments-count-output) | The number of removed issues comments. | `number` | | [added-issues-labels-count](issues/outputs/added-issues-labels-count-output) | The number of added issues labels. | `number` | | [called-api-issues-count](issues/outputs/called-api-issues-count-output) | The number of GitHub API calls performed for the issues. | `number` | | [called-api-issues-queries-count](issues/outputs/called-api-issues-queries-count-output) | The number of GitHub API queries calls performed for the issues. | `number` | diff --git a/documentation/docs/06-issues/02-outputs/01-all-outputs.mdx b/documentation/docs/06-issues/02-outputs/01-all-outputs.mdx index e0af3edaf..dcb6e4110 100644 --- a/documentation/docs/06-issues/02-outputs/01-all-outputs.mdx +++ b/documentation/docs/06-issues/02-outputs/01-all-outputs.mdx @@ -20,7 +20,9 @@ The list of all issues the outputs. | [remove-stale-issues-count](remove-stale-issues-count-output) | The number of issues from where the stale state was removed. | `number` | | [close-issues-count](close-issues-count-output) | The number of issues closed. | `number` | | [added-issues-comments-count](added-issues-comments-count-output) | The number of added issues comments. | `number` | +| [issues-labels-count](issues-labels-count-output) | The number of issues labels mutated (added or removed). | `number` | | [added-issues-labels-count](added-issues-labels-count-output) | The number of added issues labels. | `number` | +| [removed-issues-labels-count](removed-issues-labels-count-output) | The number of removed issues labels. | `number` | | [called-api-issues-count](called-api-issues-count-output) | The number of GitHub API calls performed for the issues. | `number` | | [called-api-issues-queries-count](called-api-issues-queries-count-output) | The number of GitHub API queries calls performed for the issues. | `number` | | [called-api-issues-mutations-count](called-api-issues-mutations-count-output) | The number of GitHub API mutations calls performed for the issues. | `number` | diff --git a/documentation/docs/06-issues/02-outputs/10-issues-labels-count-output.mdx b/documentation/docs/06-issues/02-outputs/10-issues-labels-count-output.mdx new file mode 100644 index 000000000..19039c781 --- /dev/null +++ b/documentation/docs/06-issues/02-outputs/10-issues-labels-count-output.mdx @@ -0,0 +1,31 @@ +--- +id: issues-labels-count-output +title: Issues labels count output +description: | + All the information you need to know about the issues labels count output. + Including a detailed description and an example. +tags: + - Issues + - Outputs +--- + +### Output {#output} + +Name: `issues-labels-count` +Type: `number` + +### Description {#description} + +This output will expose the number of issues labels mutated (added or removed). + +### Example {#example} + +```yml {6-7} +# ... +steps: + - name: Stale + id: stale + uses: sonia-corporation/stale@latest + - name: Count + run: echo "${{ steps.Stale.outputs.issues-labels-count }}" +``` diff --git a/documentation/docs/06-issues/02-outputs/10-added-issues-labels-count-output.mdx b/documentation/docs/06-issues/02-outputs/11-added-issues-labels-count-output.mdx similarity index 100% rename from documentation/docs/06-issues/02-outputs/10-added-issues-labels-count-output.mdx rename to documentation/docs/06-issues/02-outputs/11-added-issues-labels-count-output.mdx diff --git a/documentation/docs/06-issues/02-outputs/12-removed-issues-labels-count-output.mdx b/documentation/docs/06-issues/02-outputs/12-removed-issues-labels-count-output.mdx new file mode 100644 index 000000000..1fd5a36ee --- /dev/null +++ b/documentation/docs/06-issues/02-outputs/12-removed-issues-labels-count-output.mdx @@ -0,0 +1,31 @@ +--- +id: removed-issues-labels-count-output +title: Removed issues labels count output +description: | + All the information you need to know about the removed issues labels count output. + Including a detailed description and an example. +tags: + - Issues + - Outputs +--- + +### Output {#output} + +Name: `removed-issues-labels-count` +Type: `number` + +### Description {#description} + +This output will expose the number of removed issues labels. + +### Example {#example} + +```yml {6-7} +# ... +steps: + - name: Stale + id: stale + uses: sonia-corporation/stale@latest + - name: Count + run: echo "${{ steps.Stale.outputs.removed-issues-labels-count }}" +``` diff --git a/documentation/docs/06-issues/02-outputs/11-called-api-issues-count-output.mdx b/documentation/docs/06-issues/02-outputs/13-called-api-issues-count-output.mdx similarity index 100% rename from documentation/docs/06-issues/02-outputs/11-called-api-issues-count-output.mdx rename to documentation/docs/06-issues/02-outputs/13-called-api-issues-count-output.mdx diff --git a/documentation/docs/06-issues/02-outputs/12-called-api-issues-queries-count-output.mdx b/documentation/docs/06-issues/02-outputs/14-called-api-issues-queries-count-output.mdx similarity index 100% rename from documentation/docs/06-issues/02-outputs/12-called-api-issues-queries-count-output.mdx rename to documentation/docs/06-issues/02-outputs/14-called-api-issues-queries-count-output.mdx diff --git a/documentation/docs/06-issues/02-outputs/13-called-api-issues-mutations-count-output.mdx b/documentation/docs/06-issues/02-outputs/15-called-api-issues-mutations-count-output.mdx similarity index 100% rename from documentation/docs/06-issues/02-outputs/13-called-api-issues-mutations-count-output.mdx rename to documentation/docs/06-issues/02-outputs/15-called-api-issues-mutations-count-output.mdx diff --git a/src/core/outputs/annotations/issues-outputs-annotations.service.spec.ts b/src/core/outputs/annotations/issues-outputs-annotations.service.spec.ts index f230ee7df..0f0b6f161 100644 --- a/src/core/outputs/annotations/issues-outputs-annotations.service.spec.ts +++ b/src/core/outputs/annotations/issues-outputs-annotations.service.spec.ts @@ -60,16 +60,17 @@ describe(`IssuesOutputsAnnotationsService`, (): void => { IssuesStatisticsService.getInstance().closedIssuesCount = 7; IssuesStatisticsService.getInstance().addedIssuesCommentsCount = 8; IssuesStatisticsService.getInstance().addedIssuesLabelsCount = 9; - IssuesStatisticsService.getInstance().calledApiIssuesQueriesCount = 10; - IssuesStatisticsService.getInstance().calledApiIssuesMutationsCount = 11; + IssuesStatisticsService.getInstance().removedIssuesLabelsCount = 10; + IssuesStatisticsService.getInstance().calledApiIssuesQueriesCount = 11; + IssuesStatisticsService.getInstance().calledApiIssuesMutationsCount = 12; }); it(`should log the issues outputs annotations`, (): void => { - expect.assertions(13); + expect.assertions(15); service.noticeAllOutputs(); - expect(coreNoticeSpy).toHaveBeenCalledTimes(12); + expect(coreNoticeSpy).toHaveBeenCalledTimes(14); expect(coreNoticeSpy).toHaveBeenNthCalledWith(1, `Already stale issues: 5`); expect(coreNoticeSpy).toHaveBeenNthCalledWith(2, `Ignored issues: 2`); expect(coreNoticeSpy).toHaveBeenNthCalledWith(3, `Unaltered issues: 3`); @@ -78,10 +79,12 @@ describe(`IssuesOutputsAnnotationsService`, (): void => { expect(coreNoticeSpy).toHaveBeenNthCalledWith(6, `Remove stale issues: 6`); expect(coreNoticeSpy).toHaveBeenNthCalledWith(7, `Closed issues: 7`); expect(coreNoticeSpy).toHaveBeenNthCalledWith(8, `Added issues comments: 8`); - expect(coreNoticeSpy).toHaveBeenNthCalledWith(9, `Added issues labels: 9`); - expect(coreNoticeSpy).toHaveBeenNthCalledWith(10, `Called api issues: 21`); - expect(coreNoticeSpy).toHaveBeenNthCalledWith(11, `Called api issues queries: 10`); - expect(coreNoticeSpy).toHaveBeenNthCalledWith(12, `Called api issues mutations: 11`); + expect(coreNoticeSpy).toHaveBeenNthCalledWith(9, `Issues labels: 19`); + expect(coreNoticeSpy).toHaveBeenNthCalledWith(10, `Added issues labels: 9`); + expect(coreNoticeSpy).toHaveBeenNthCalledWith(11, `Removed issues labels: 10`); + expect(coreNoticeSpy).toHaveBeenNthCalledWith(12, `Called api issues: 23`); + expect(coreNoticeSpy).toHaveBeenNthCalledWith(13, `Called api issues queries: 11`); + expect(coreNoticeSpy).toHaveBeenNthCalledWith(14, `Called api issues mutations: 12`); }); }); @@ -96,6 +99,7 @@ describe(`IssuesOutputsAnnotationsService`, (): void => { IssuesStatisticsService.getInstance().closedIssuesCount = 0; IssuesStatisticsService.getInstance().addedIssuesCommentsCount = 0; IssuesStatisticsService.getInstance().addedIssuesLabelsCount = 0; + IssuesStatisticsService.getInstance().removedIssuesLabelsCount = 0; IssuesStatisticsService.getInstance().calledApiIssuesQueriesCount = 0; IssuesStatisticsService.getInstance().calledApiIssuesMutationsCount = 0; }); diff --git a/src/core/outputs/annotations/issues-outputs-annotations.service.ts b/src/core/outputs/annotations/issues-outputs-annotations.service.ts index f3b422325..647579def 100644 --- a/src/core/outputs/annotations/issues-outputs-annotations.service.ts +++ b/src/core/outputs/annotations/issues-outputs-annotations.service.ts @@ -30,12 +30,18 @@ const MAP: { [key in keyof typeof EIssuesOutputs]: () => void } = { IGNORED_ISSUES_COUNT(): void { noticeCount(`Ignored issues`, IssuesStatisticsService.getInstance().ignoredIssuesCount); }, + ISSUES_LABELS_COUNT(): void { + noticeCount(`Issues labels`, IssuesStatisticsService.getInstance().issuesLabelsCount); + }, PROCESSED_ISSUES_COUNT(): void { noticeCount(`Processed issues`, IssuesStatisticsService.getInstance().processedIssuesCount); }, REMOVE_STALE_ISSUES_COUNT(): void { noticeCount(`Remove stale issues`, IssuesStatisticsService.getInstance().removeStaleIssuesCount); }, + REMOVED_ISSUES_LABELS_COUNT(): void { + noticeCount(`Removed issues labels`, IssuesStatisticsService.getInstance().removedIssuesLabelsCount); + }, STALE_ISSUES_COUNT(): void { noticeCount(`Stale issues`, IssuesStatisticsService.getInstance().staleIssuesCount); }, diff --git a/src/core/outputs/enums/issues-outputs.enum.ts b/src/core/outputs/enums/issues-outputs.enum.ts index fb3acf247..bf719b4e1 100644 --- a/src/core/outputs/enums/issues-outputs.enum.ts +++ b/src/core/outputs/enums/issues-outputs.enum.ts @@ -7,7 +7,9 @@ export enum EIssuesOutputs { REMOVE_STALE_ISSUES_COUNT = `remove-stale-issues-count`, CLOSE_ISSUES_COUNT = `close-issues-count`, ADDED_ISSUES_COMMENTS_COUNT = `added-issues-comments-count`, + ISSUES_LABELS_COUNT = `issues-labels-count`, ADDED_ISSUES_LABELS_COUNT = `added-issues-labels-count`, + REMOVED_ISSUES_LABELS_COUNT = `removed-issues-labels-count`, CALLED_API_ISSUES_COUNT = `called-api-issues-count`, CALLED_API_ISSUES_QUERIES_COUNT = `called-api-issues-queries-count`, CALLED_API_ISSUES_MUTATIONS_COUNT = `called-api-issues-mutations-count`, diff --git a/src/core/outputs/issues-outputs.service.spec.ts b/src/core/outputs/issues-outputs.service.spec.ts index 17ec67e67..ad7cbb36d 100644 --- a/src/core/outputs/issues-outputs.service.spec.ts +++ b/src/core/outputs/issues-outputs.service.spec.ts @@ -51,7 +51,7 @@ describe(`IssuesOutputsService`, (): void => { }); it(`should set the statistics outputs`, (): void => { - expect.assertions(13); + expect.assertions(15); IssuesStatisticsService.getInstance().processedIssuesCount = 1; IssuesStatisticsService.getInstance().ignoredIssuesCount = 1; IssuesStatisticsService.getInstance().unalteredIssuesCount = 1; @@ -61,12 +61,13 @@ describe(`IssuesOutputsService`, (): void => { IssuesStatisticsService.getInstance().closedIssuesCount = 1; IssuesStatisticsService.getInstance().addedIssuesCommentsCount = 1; IssuesStatisticsService.getInstance().addedIssuesLabelsCount = 1; + IssuesStatisticsService.getInstance().removedIssuesLabelsCount = 1; IssuesStatisticsService.getInstance().calledApiIssuesQueriesCount = 1; IssuesStatisticsService.getInstance().calledApiIssuesMutationsCount = 1; service.setOutputs(); - expect(coreSetOutputSpy).toHaveBeenCalledTimes(12); + expect(coreSetOutputSpy).toHaveBeenCalledTimes(14); expect(coreSetOutputSpy).toHaveBeenNthCalledWith(1, EIssuesOutputs.ALREADY_STALE_ISSUES_COUNT, 1); expect(coreSetOutputSpy).toHaveBeenNthCalledWith(2, EIssuesOutputs.IGNORED_ISSUES_COUNT, 1); expect(coreSetOutputSpy).toHaveBeenNthCalledWith(3, EIssuesOutputs.UNALTERED_ISSUES_COUNT, 1); @@ -75,10 +76,12 @@ describe(`IssuesOutputsService`, (): void => { expect(coreSetOutputSpy).toHaveBeenNthCalledWith(6, EIssuesOutputs.REMOVE_STALE_ISSUES_COUNT, 1); expect(coreSetOutputSpy).toHaveBeenNthCalledWith(7, EIssuesOutputs.CLOSE_ISSUES_COUNT, 1); expect(coreSetOutputSpy).toHaveBeenNthCalledWith(8, EIssuesOutputs.ADDED_ISSUES_COMMENTS_COUNT, 1); - expect(coreSetOutputSpy).toHaveBeenNthCalledWith(9, EIssuesOutputs.ADDED_ISSUES_LABELS_COUNT, 1); - expect(coreSetOutputSpy).toHaveBeenNthCalledWith(10, EIssuesOutputs.CALLED_API_ISSUES_COUNT, 2); - expect(coreSetOutputSpy).toHaveBeenNthCalledWith(11, EIssuesOutputs.CALLED_API_ISSUES_QUERIES_COUNT, 1); - expect(coreSetOutputSpy).toHaveBeenNthCalledWith(12, EIssuesOutputs.CALLED_API_ISSUES_MUTATIONS_COUNT, 1); + expect(coreSetOutputSpy).toHaveBeenNthCalledWith(9, EIssuesOutputs.ISSUES_LABELS_COUNT, 2); + expect(coreSetOutputSpy).toHaveBeenNthCalledWith(10, EIssuesOutputs.ADDED_ISSUES_LABELS_COUNT, 1); + expect(coreSetOutputSpy).toHaveBeenNthCalledWith(11, EIssuesOutputs.REMOVED_ISSUES_LABELS_COUNT, 1); + expect(coreSetOutputSpy).toHaveBeenNthCalledWith(12, EIssuesOutputs.CALLED_API_ISSUES_COUNT, 2); + expect(coreSetOutputSpy).toHaveBeenNthCalledWith(13, EIssuesOutputs.CALLED_API_ISSUES_QUERIES_COUNT, 1); + expect(coreSetOutputSpy).toHaveBeenNthCalledWith(14, EIssuesOutputs.CALLED_API_ISSUES_MUTATIONS_COUNT, 1); }); it(`should log about the end of the issues output setup`, (): void => { diff --git a/src/core/outputs/issues-outputs.service.ts b/src/core/outputs/issues-outputs.service.ts index da4e3302b..dea14d74f 100644 --- a/src/core/outputs/issues-outputs.service.ts +++ b/src/core/outputs/issues-outputs.service.ts @@ -14,8 +14,10 @@ const MAP: { [key in keyof typeof EIssuesOutputs]: () => number } = { CALLED_API_ISSUES_QUERIES_COUNT: (): number => IssuesStatisticsService.getInstance().calledApiIssuesQueriesCount, CLOSE_ISSUES_COUNT: (): number => IssuesStatisticsService.getInstance().closedIssuesCount, IGNORED_ISSUES_COUNT: (): number => IssuesStatisticsService.getInstance().ignoredIssuesCount, + ISSUES_LABELS_COUNT: (): number => IssuesStatisticsService.getInstance().calledApiIssuesCount, PROCESSED_ISSUES_COUNT: (): number => IssuesStatisticsService.getInstance().processedIssuesCount, REMOVE_STALE_ISSUES_COUNT: (): number => IssuesStatisticsService.getInstance().removeStaleIssuesCount, + REMOVED_ISSUES_LABELS_COUNT: (): number => IssuesStatisticsService.getInstance().removedIssuesLabelsCount, STALE_ISSUES_COUNT: (): number => IssuesStatisticsService.getInstance().staleIssuesCount, UNALTERED_ISSUES_COUNT: (): number => IssuesStatisticsService.getInstance().unalteredIssuesCount, }; diff --git a/src/core/statistics/issues-statistics.service.ts b/src/core/statistics/issues-statistics.service.ts index 1a2f3bb29..afd6f092a 100644 --- a/src/core/statistics/issues-statistics.service.ts +++ b/src/core/statistics/issues-statistics.service.ts @@ -42,6 +42,10 @@ export class IssuesStatisticsService extends AbstractStatisticsService { public unalteredIssuesCount: number = 0; protected readonly _statisticsName: 'issues' = `issues`; + public get issuesLabelsCount(): number { + return this.addedIssuesLabelsCount + this.removedIssuesLabelsCount; + } + public get calledApiIssuesCount(): number { return this.calledApiIssuesQueriesCount + this.calledApiIssuesMutationsCount; } diff --git a/tests/issues/issue-to-stale-extra-labels.spec.ts b/tests/issues/issue-to-stale-add-extra-labels.spec.ts similarity index 91% rename from tests/issues/issue-to-stale-extra-labels.spec.ts rename to tests/issues/issue-to-stale-add-extra-labels.spec.ts index 19e4e6895..d9457d942 100644 --- a/tests/issues/issue-to-stale-extra-labels.spec.ts +++ b/tests/issues/issue-to-stale-add-extra-labels.spec.ts @@ -1,10 +1,10 @@ import { FakeIssuesProcessor } from '@tests/utils/fake-issues-processor'; import { DateTime } from 'luxon'; -describe(`Issue to stale extra labels`, (): void => { +describe(`Issue to stale add extra labels`, (): void => { let issueSut: FakeIssuesProcessor; - describe(`when the issue should not have extra labels when stale`, (): void => { + describe(`when the issue should not have extra labels added when stale`, (): void => { beforeEach((): void => { issueSut = new FakeIssuesProcessor({ issueAddLabelsAfterStale: [], @@ -54,7 +54,7 @@ describe(`Issue to stale extra labels`, (): void => { }); }); - it(`should stale the issue and add the extra labels`, async (): Promise => { + it(`should stale the issue and add the extra label`, async (): Promise => { expect.assertions(11); await issueSut.process(); @@ -122,7 +122,7 @@ describe(`Issue to stale extra labels`, (): void => { describe(`when the issue should add three more labels when stale`, (): void => { beforeEach((): void => { - issueSut.setExtraStaleLabels([`extra-stale-label-1`, `extra-stale-label-2`, `extra-stale-label-3`]); + issueSut.setExtraAddedStaleLabels([`extra-stale-label-1`, `extra-stale-label-2`, `extra-stale-label-3`]); }); it(`should stale the issue and not add some extra labels`, async (): Promise => {