From beeadc2f4a6110433288943db7b696d3fc0f2802 Mon Sep 17 00:00:00 2001 From: CerealBoy Date: Fri, 10 Jan 2025 09:30:30 +1100 Subject: [PATCH] Also allow for SHA256 values --- internal/job/checkout.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/job/checkout.go b/internal/job/checkout.go index 8184758d2a..992d32d951 100644 --- a/internal/job/checkout.go +++ b/internal/job/checkout.go @@ -781,7 +781,7 @@ func gitFetchCommitWithFallback(ctx context.Context, shell *shell.Shell, gitFetc const CommitMetadataKey = "buildkite:git:commit" -var potentiallyValidGitSHA = regexp.MustCompile(`^[a-f0-9]{40}$`) +var potentiallyValidGitSHA = regexp.MustCompile(`^[a-f0-9]{40}|[a-f0-9]{64}$`) // sendCommitToBuildkite sends commit information (commit, author, subject, body) to Buildkite, as the BK backend doesn't // have access to user's VCSes. To do this, we set a special meta-data key in the build, but only if it isn't already present