format summary output as list (#105)

Signed-off-by: Brian DeHamer <bdehamer@github.com>
This commit is contained in:
Brian DeHamer
2024-07-24 14:31:01 -07:00
committed by GitHub
parent 8a5620929d
commit f1338058bc
2 changed files with 8 additions and 4 deletions
Generated Vendored
+3 -1
View File
@@ -80189,11 +80189,13 @@ const logSummary = (attestations) => {
core.summary.addHeading(
/* istanbul ignore next */
attestations.length > 1 ? 'Attestations Created' : 'Attestation Created', 3);
const listItems = [];
for (const { subjectName, subjectDigest, attestationID } of attestations) {
if (attestationID) {
core.summary.addLink(`${subjectName}@${subjectDigest}`, attestationURL(attestationID));
listItems.push(`<a href="${attestationURL(attestationID)}">${subjectName}@${subjectDigest}</a>`);
}
}
core.summary.addList(listItems);
core.summary.write();
}
};
+5 -3
View File
@@ -166,14 +166,16 @@ const logSummary = (attestations: AttestResult[]): void => {
3
)
const listItems = []
for (const { subjectName, subjectDigest, attestationID } of attestations) {
if (attestationID) {
core.summary.addLink(
`${subjectName}@${subjectDigest}`,
attestationURL(attestationID)
listItems.push(
`<a href="${attestationURL(attestationID)}">${subjectName}@${subjectDigest}</a>`
)
}
}
core.summary.addList(listItems)
core.summary.write()
}
}