improve comments about the sha and ref inputs

This commit is contained in:
E. Lynette Rayle
2025-05-29 19:23:09 +00:00
parent 6df4cede7a
commit 888b4d0158

View File

@@ -119,15 +119,17 @@ async function main () {
})
snapshot.addManifest(manifest)
// only override the sha if the input has a value
// otherwise, continue to use the sha set from the context in the Snapshot constructor
const inputSHA = core.getInput('sha')
if (inputSHA !== '') {
// only set the SHA if it is not empty; otherwise, use the SHA from the context
snapshot.sha = inputSHA
}
// only override the ref if the input has a value
// otherwise, continue to use the ref set from the context in the Snapshot constructor
const inputRef = core.getInput('ref')
if (inputRef !== '') {
// only set the ref if it is not empty; otherwise, use the ref from the context
snapshot.ref = inputRef
}