Skip to content

Commit

Permalink
add issue close state_reason support
Browse files Browse the repository at this point in the history
  • Loading branch information
JRoy committed Jan 28, 2025
1 parent 61ca49a commit 13f3bfa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,10 @@ function buildIssueComment(json: any, env: BoundEnv): string | null {
function buildIssueClose(json: any): string {
const { issue, repository, sender } = json;

const reason = issue.state_reason;

return buildEmbedBody(
`[${repository["full_name"]}] Issue closed: #${issue.number} ${issue.title}`,
`[${repository["full_name"]}] Issue closed ${reason ? `as ${reason.replaceAll('_', ' ')}` : ''}: #${issue.number} ${issue.title}`,
issue["html_url"],
sender,
16730159
Expand Down

0 comments on commit 13f3bfa

Please sign in to comment.