Skip to content

Commit

Permalink
fixup: correct details markdown for dependency metadata (#84)
Browse files Browse the repository at this point in the history
* fixup: correct details markdown for dependency metadata

* add missing </pre>

* replace `<` by `&#60;`
  • Loading branch information
lemeurherve authored Feb 10, 2024
1 parent 89790c9 commit e86338d
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions lib/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,7 @@ export default {
createStatus: async (owner, repo, head_sha, entries) => {
const github = await getRestClient();

let summary = entries.map(entry => `- [${entry.artifactId}](${entry.url})`).join("\n")

summary += "```xml\n"
summary += "<dependency>\n"
summary += ` <groupId>${entries[0].groupId}</groupId>` + "\n"
summary += ` <artifactId>${entries[0].artifactId}</artifactId>` + "\n"
summary += ` <version>${entries[0].version}</version>` + "\n"
summary += "</dependency>\n"
summary += "```\n"
const metadata = `<pre>&#xA;&#60;dependency>&#xA; &#60;groupId>${entries[0].groupId}&#60;/groupId>&#xA; &#60;artifactId>${entries[0].artifactId}&#60;/artifactId>&#xA; &#60;version>${entries[0].version}&#60;/version>&#xA;&#60;/dependency>&#xA;</pre>`

return github.rest.checks.create({
owner,
Expand All @@ -59,7 +51,8 @@ export default {
details_url: entries[0].url,
output: {
title: `Deployed version ${entries[0].version} to Incrementals`,
summary: summary
summary: entries.map(entry => `- [${entry.artifactId}](${entry.url})`).join("\n"),
text: metadata
}
});
}
Expand Down

0 comments on commit e86338d

Please sign in to comment.