Skip to content

Commit 02e44c8

Browse files
fix(options)!: Make not_planned the default close-issue-reason (#807)
* docs: add source for default testing options * 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
1 parent 99b6c70 commit 02e44c8

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Every argument is optional.
4444
| [close-pr-message](#close-pr-message) | Comment on the staled PRs while closed | |
4545
| [stale-issue-label](#stale-issue-label) | Label to apply on staled issues | `Stale` |
4646
| [close-issue-label](#close-issue-label) | Label to apply on closed issues | |
47-
| [close-issue-reason](#close-issue-reason) | Reason to use when closing issues | |
47+
| [close-issue-reason](#close-issue-reason) | Reason to use when closing issues | `not_planned` |
4848
| [stale-pr-label](#stale-pr-label) | Label to apply on staled PRs | `Stale` |
4949
| [close-pr-label](#close-pr-label) | Label to apply on closed PRs | |
5050
| [exempt-issue-labels](#exempt-issue-labels) | Labels on issues exempted from stale | |
@@ -226,7 +226,7 @@ Required Permission: `issues: write`
226226

227227
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`.
228228

229-
Default value: unset
229+
Default value: `not_planned`
230230

231231
#### stale-pr-label
232232

__tests__/constants/default-processor-options.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options';
22

3+
// Default options for use in tests.
4+
// Mirrors the defaults defined in action.yml
35
export const DefaultProcessorOptions: IIssuesProcessorOptions = Object.freeze({
46
repoToken: 'none',
57
staleIssueMessage: 'This issue is stale',
@@ -51,6 +53,6 @@ export const DefaultProcessorOptions: IIssuesProcessorOptions = Object.freeze({
5153
ignoreIssueUpdates: undefined,
5254
ignorePrUpdates: undefined,
5355
exemptDraftPr: false,
54-
closeIssueReason: '',
56+
closeIssueReason: 'not_planned',
5557
includeOnlyAssigned: false
5658
});

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ inputs:
5151
required: false
5252
close-issue-reason:
5353
description: 'The reason to use when closing an issue.'
54-
default: ''
54+
default: 'not_planned'
5555
required: false
5656
stale-pr-label:
5757
description: 'The label to apply when a pull request is stale.'

0 commit comments

Comments
 (0)