Skip to content

Commit

Permalink
Remove unused import and update markdown formatting in GitHub functions
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Sep 20, 2024
1 parent 7024e6e commit 6374bac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion packages/cli/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
githubCreatePullRequestReviews,
githubUpdatePullRequestDescription,
githubParseEnv,
githubQueryEnvUsingCli,
} from "../../core/src/github"
import {
HTTPS_REGEX,
Expand Down
6 changes: 4 additions & 2 deletions packages/core/src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,17 @@ export function mergeDescription(

const start = body.indexOf(tag)
const end = body.indexOf(endTag)
const header = "<hr/>"
if (start > -1 && end > -1 && start < end) {
body =
body.slice(0, start + tag.length) +
header +
sep +
text +
sep +
body.slice(end)
} else {
body = body + sep + tag + sep + text + sep + endTag + sep
body = body + sep + tag + header + sep + text + sep + endTag + sep
}
return body
}
Expand All @@ -190,7 +192,7 @@ export function appendGeneratedComment(
) {
const { message, code, severity } = annotation
return prettifyMarkdown(
`<!-- genaiscript ${severity} ${code || ""} --><hr/>
`<!-- genaiscript ${severity} ${code || ""} -->
${message}
${generatedByFooter(script, info, code)}`
)
Expand Down

0 comments on commit 6374bac

Please sign in to comment.