From 924050a0c518e078d2d30cd1d2aa74f63ef8cd14 Mon Sep 17 00:00:00 2001 From: David Allison <62114487+david-allison@users.noreply.github.com> Date: Mon, 5 Sep 2022 13:50:50 +0100 Subject: [PATCH] fix(options)!: Default to 'Close as not planned' GitHub introduced an additional close reason 'Close as not planned': https://github.blog/changelog/2022-05-19-the-new-github-issues-may-19th-update/ 'stale' is a use case for this close reason Fixes #789 BREAKING CHANGE: `close-issue-reason` defaults to `not_planned` (previously: `` which defaulted to `completed`) This closes the issue as 'not planned' on GitHub rather than 'completed' See: https://github.blog/changelog/2022-05-19-the-new-github-issues-may-19th-update --- README.md | 4 ++-- __tests__/constants/default-processor-options.ts | 2 +- action.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3ab50de31..501a8db7f 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Every argument is optional. | [close-pr-message](#close-pr-message) | Comment on the staled PRs while closed | | | [stale-issue-label](#stale-issue-label) | Label to apply on staled issues | `Stale` | | [close-issue-label](#close-issue-label) | Label to apply on closed issues | | -| [close-issue-reason](#close-issue-reason) | Reason to use when closing issues | | +| [close-issue-reason](#close-issue-reason) | Reason to use when closing issues | `not_planned` | | [stale-pr-label](#stale-pr-label) | Label to apply on staled PRs | `Stale` | | [close-pr-label](#close-pr-label) | Label to apply on closed PRs | | | [exempt-issue-labels](#exempt-issue-labels) | Labels on issues exempted from stale | | @@ -224,7 +224,7 @@ Required Permission: `issues: write` Specify the [reason](https://github.blog/changelog/2022-05-19-the-new-github-issues-may-19th-update/) used when closing issues. Valid values are `completed` and `not_planned`. -Default value: unset +Default value: `not_planned` #### stale-pr-label diff --git a/__tests__/constants/default-processor-options.ts b/__tests__/constants/default-processor-options.ts index db28fa1d0..bc4561a9b 100644 --- a/__tests__/constants/default-processor-options.ts +++ b/__tests__/constants/default-processor-options.ts @@ -53,5 +53,5 @@ export const DefaultProcessorOptions: IIssuesProcessorOptions = Object.freeze({ ignoreIssueUpdates: undefined, ignorePrUpdates: undefined, exemptDraftPr: false, - closeIssueReason: '' + closeIssueReason: 'not_planned' }); diff --git a/action.yml b/action.yml index a8270218b..47e144410 100644 --- a/action.yml +++ b/action.yml @@ -51,7 +51,7 @@ inputs: required: false close-issue-reason: description: 'The reason to use when closing an issue.' - default: '' + default: 'not_planned' required: false stale-pr-label: description: 'The label to apply when a pull request is stale.'