Skip to content

Commit 13f3bfa

Browse files
committed
add issue close state_reason support
1 parent 61ca49a commit 13f3bfa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,10 @@ function buildIssueComment(json: any, env: BoundEnv): string | null {
441441
function buildIssueClose(json: any): string {
442442
const { issue, repository, sender } = json;
443443

444+
const reason = issue.state_reason;
445+
444446
return buildEmbedBody(
445-
`[${repository["full_name"]}] Issue closed: #${issue.number} ${issue.title}`,
447+
`[${repository["full_name"]}] Issue closed ${reason ? `as ${reason.replaceAll('_', ' ')}` : ''}: #${issue.number} ${issue.title}`,
446448
issue["html_url"],
447449
sender,
448450
16730159

0 commit comments

Comments
 (0)