Skip to content

Commit

Permalink
Merge pull request #230 from gatewayapps/fix-no-description-cloning
Browse files Browse the repository at this point in the history
fix: clone works with empty description
  • Loading branch information
johnmurphy01 authored Dec 31, 2024
2 parents cb30c15 + 10f030a commit 6d1fe72
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,10 @@ async function createGithubIssue(repo, oldIssue, closeOriginal) {
}

chrome.storage.sync.get({ preventReferences: false }, async (item) => {
const blockQuoteOldBody = addBlockQuote(oldIssue.body)
const blockQuoteOldBody = oldIssue.body ? addBlockQuote(oldIssue.body) : '';
const createdAt = oldIssue.created_at.split('T')[0]
const newIssueBody = `**[<img src="https://avatars.githubusercontent.com/u/${oldIssue.user.id}?s=17&v=4" width="17" height="17"> @${oldIssue.user.login}](${oldIssue.user.html_url})** cloned issue [${organization}/${currentRepo}#${issueNumber}](${oldIssue.html_url}) on ${createdAt}: \n\n${blockQuoteOldBody}`
const newIssueBody = oldIssue.body ? `**[<img src="https://avatars.githubusercontent.com/u/${oldIssue.user.id}?s=17&v=4" width="17" height="17"> @${oldIssue.user.login}](${oldIssue.user.html_url})** cloned issue [${organization}/${currentRepo}#${issueNumber}](${oldIssue.html_url}) on ${createdAt}: \n\n${blockQuoteOldBody}`
: ``

const newIssue = {
title: oldIssue.title,
Expand Down

0 comments on commit 6d1fe72

Please sign in to comment.