Skip to content

Commit

Permalink
move function to more relevant file
Browse files Browse the repository at this point in the history
Signed-off-by: Meredith Lancaster <[email protected]>
  • Loading branch information
malancas committed May 28, 2024
1 parent 46af64b commit 4c6ec12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/cmd/attestation/verify/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
4 changes: 4 additions & 0 deletions pkg/cmd/attestation/verify/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4c6ec12

Please sign in to comment.