From 4c6ec12499839a5fd1515c17dc3435db2438703f Mon Sep 17 00:00:00 2001 From: Meredith Lancaster Date: Tue, 28 May 2024 13:43:18 -0600 Subject: [PATCH] move function to more relevant file Signed-off-by: Meredith Lancaster --- pkg/cmd/attestation/verify/options.go | 4 ---- pkg/cmd/attestation/verify/policy.go | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/cmd/attestation/verify/options.go b/pkg/cmd/attestation/verify/options.go index eddae41e489..25180df602c 100644 --- a/pkg/cmd/attestation/verify/options.go +++ b/pkg/cmd/attestation/verify/options.go @@ -94,7 +94,3 @@ func isProvidedRepoValid(repo string) bool { splitRepo := strings.Split(repo, "/") return len(splitRepo) == 2 } - -func expandToGitHubURL(ownerOrRepo string) string { - return fmt.Sprintf("^https://github.com/%s/", ownerOrRepo) -} diff --git a/pkg/cmd/attestation/verify/policy.go b/pkg/cmd/attestation/verify/policy.go index e18b9fef039..e07c565b2a7 100644 --- a/pkg/cmd/attestation/verify/policy.go +++ b/pkg/cmd/attestation/verify/policy.go @@ -16,6 +16,10 @@ const ( GitHubRunner = "github-hosted" ) +func expandToGitHubURL(ownerOrRepo string) string { + return fmt.Sprintf("^https://github.com/%s/", ownerOrRepo) +} + func buildSANMatcher(opts *Options) (verify.SubjectAlternativeNameMatcher, error) { if opts.SignerRepo != "" { signedRepoRegex := expandToGitHubURL(opts.SignerRepo)