format summary output as list (#105)
Signed-off-by: Brian DeHamer <bdehamer@github.com>
This commit is contained in:
+3
-1
@@ -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
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user