You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Derive digest algorithm from ref length in release verify commands
The 'gh release verify' and 'gh release verify-asset' commands hard-coded
a 'sha1:' prefix when constructing the digest identifier for a release
tag's commit SHA. Once GitHub repositories using SHA-256 commit digests
are supported, that ref will be a 64-character SHA-256 hash and labeling
it as 'sha1:' is both misleading in user output and incorrect for the
attestation lookup.
Add a shared 'DigestAlgForRef' helper that returns 'sha256' for 64-char
digests and 'sha1' otherwise (preserving existing behavior for SHA-1
repositories), and use it at both call sites. Add test coverage for the
helper and for the SHA-256 error path in both commands.
Fixescli#13429
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments