format summary output as list (#105)
Signed-off-by: Brian DeHamer <[email protected]>
This commit is contained in:
+3
-1
@@ -80189,11 +80189,13 @@ const logSummary = (attestations) => {
|
|||||||
core.summary.addHeading(
|
core.summary.addHeading(
|
||||||
/* istanbul ignore next */
|
/* istanbul ignore next */
|
||||||
attestations.length > 1 ? 'Attestations Created' : 'Attestation Created', 3);
|
attestations.length > 1 ? 'Attestations Created' : 'Attestation Created', 3);
|
||||||
|
const listItems = [];
|
||||||
for (const { subjectName, subjectDigest, attestationID } of attestations) {
|
for (const { subjectName, subjectDigest, attestationID } of attestations) {
|
||||||
if (attestationID) {
|
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();
|
core.summary.write();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+5
-3
@@ -166,14 +166,16 @@ const logSummary = (attestations: AttestResult[]): void => {
|
|||||||
3
|
3
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const listItems = []
|
||||||
for (const { subjectName, subjectDigest, attestationID } of attestations) {
|
for (const { subjectName, subjectDigest, attestationID } of attestations) {
|
||||||
if (attestationID) {
|
if (attestationID) {
|
||||||
core.summary.addLink(
|
listItems.push(
|
||||||
`${subjectName}@${subjectDigest}`,
|
`<a href="${attestationURL(attestationID)}">${subjectName}@${subjectDigest}</a>`
|
||||||
attestationURL(attestationID)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
core.summary.addList(listItems)
|
||||||
core.summary.write()
|
core.summary.write()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user