We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ParseProjectRepo does not handle repositories correctly.
E.g. myproject/foo/bar will fail with an 404 error.
diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 5bff783..83f4330 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -39,11 +39,19 @@ func PrintPayloadInYAMLFormat(payload any) { } func ParseProjectRepo(projectRepo string) (string, string) { + project := "" + repo := "" split := strings.Split(projectRepo, "/") - if len(split) != 2 { + if len(split) > 2 { + project = split[0] + repo = strings.Join(split[1:], "%2F") + } else if len(split) == 2 { + project = split[0] + repo = split[1] + } else { log.Fatalf("invalid project/repository format: %s", projectRepo) } - return split[0], split[1] + return project, repo }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ParseProjectRepo does not handle repositories correctly.
E.g. myproject/foo/bar will fail with an 404 error.
The text was updated successfully, but these errors were encountered: