diff --git a/src/common/gitProvider/azureDevops.ts b/src/common/gitProvider/azureDevops.ts index d0e106bfd..6bd148317 100644 --- a/src/common/gitProvider/azureDevops.ts +++ b/src/common/gitProvider/azureDevops.ts @@ -542,8 +542,12 @@ _Powered by [sfdx-hardis](${CONSTANTS.DOC_URL_ROOT}) from job [${azureJobName}]( imageName // File name ); if (attachment && attachment.url) { + uxLog(this, c.grey(`[Bitbucket Integration] Image uploaded for comment: ${attachment.url}`)); return attachment.url; } + else { + uxLog(this, c.yellow(`[Bitbucket Integration] Image uploaded but unable to get URL from response\n${JSON.stringify(attachment, null, 2)}`)); + } } catch (e) { uxLog(this, c.yellow(`[Azure Integration] Error while uploading image ${localImagePath}\n${(e as Error).message}`)); } diff --git a/src/common/gitProvider/bitbucket.ts b/src/common/gitProvider/bitbucket.ts index 8cb5d36fe..ae102a73f 100644 --- a/src/common/gitProvider/bitbucket.ts +++ b/src/common/gitProvider/bitbucket.ts @@ -306,8 +306,12 @@ export class BitbucketProvider extends GitProviderRoot { _body: filesForm, }); if (attachmentResponse?.data?.links?.self?.href) { + uxLog(this, c.grey(`[Bitbucket Integration] Image uploaded for comment: ${attachmentResponse.data.links.self.href}`)); return attachmentResponse.data.links.self.href; } + else { + uxLog(this, c.yellow(`[Bitbucket Integration] Image uploaded but unable to get URL from response\n${JSON.stringify(attachmentResponse, null, 2)}`)); + } } catch (e) { uxLog(this, c.yellow(`[Bitbucket Integration] Error while uploading image ${localImagePath}\n${(e as Error).message}`)); } diff --git a/src/common/gitProvider/utilsMarkdown.ts b/src/common/gitProvider/utilsMarkdown.ts index 80546cbe0..15627b4c4 100644 --- a/src/common/gitProvider/utilsMarkdown.ts +++ b/src/common/gitProvider/utilsMarkdown.ts @@ -118,7 +118,8 @@ async function generateDiffMarkdownWithMermaid(fileMetadata: string | null, from async function generateDiffMarkdownWithSvg(fileMetadata: string | null, fromCommit: string, toCommit: string, flowDiffMarkdownList: any, flowName: string) { const { outputDiffMdFile } = await generateFlowVisualGitDiff(fileMetadata, fromCommit, toCommit, { mermaidMd: true, svgMd: true, debug: false }); - flowDiffMarkdownList.push({ name: flowName, markdown: outputDiffMdFile }); + const flowDiffMarkdownWithSvg = await fs.readFile(outputDiffMdFile, "utf8"); + flowDiffMarkdownList.push({ name: flowName, markdown: flowDiffMarkdownWithSvg }); } function getAiPromptResponseMarkdown(title, message) {