Skip to content

Commit

Permalink
fix: images from linear comments does not appear on github issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rockingrohit9639 committed Mar 11, 2024
1 parent d7953c6 commit 8f6e632
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion utils/webhook/linear.handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,13 @@ export async function linearWebhookHandler(
);
}

const modifiedBody = await replaceMentions(data.body, "linear");
let modifiedBody = await replaceMentions(data.body, "linear");

// Re-fetching the comment returns it with public image URLs
if (modifiedBody?.match(GENERAL.INLINE_IMG_TAG_REGEX)) {
const publicComment = await linear.comment(data.id);
modifiedBody = publicComment.body;
}

const footer = getGithubFooterWithLinearCommentId(
data.user?.name,
Expand Down

0 comments on commit 8f6e632

Please sign in to comment.