From e8741ad29850dde44248120bb1c3e60cee3b9ade Mon Sep 17 00:00:00 2001 From: Shivaditya Shivganesh Date: Tue, 26 Nov 2024 02:49:36 -0500 Subject: [PATCH] fix: add parens to strings --- src/handlers/add-issue.ts | 2 +- src/handlers/update-issue.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers/add-issue.ts b/src/handlers/add-issue.ts index 6db8c39..2f15040 100644 --- a/src/handlers/add-issue.ts +++ b/src/handlers/add-issue.ts @@ -8,7 +8,7 @@ export async function addIssue(context: Context<"issues.opened">) { payload, } = context; const issue = payload.issue; - const markdown = payload.issue.body && payload.issue.title ? `${payload.issue.body} ${payload.issue.title}` : null; + const markdown = issue.body + " " + issue.title || null; const authorId = issue.user?.id || -1; const id = issue.node_id; const isPrivate = payload.repository.private; diff --git a/src/handlers/update-issue.ts b/src/handlers/update-issue.ts index 8ac2d8a..43c3827 100644 --- a/src/handlers/update-issue.ts +++ b/src/handlers/update-issue.ts @@ -9,7 +9,7 @@ export async function updateIssue(context: Context<"issues.edited">) { } = context; const id = payload.issue.node_id; const isPrivate = payload.repository.private; - const markdown = payload.issue.body && payload.issue.title ? payload.issue.body + " " + payload.issue.title : null; + const markdown = payload.issue.body + " " + payload.issue.title || null; const authorId = payload.issue.user?.id || -1; // Fetch the previous issue and update it in the db try {