Commit 5081d982 authored by zauberstuhl's avatar zauberstuhl

Fix replace all slash in project slug

related to subgroup support
parent 728c9d90
Pipeline #877 passed with stages
in 3 minutes and 30 seconds
......@@ -312,7 +312,7 @@ func (build *Build) Update(status BuildStatus) error {
_, err := build.Project.ApiRequest("POST", fmt.Sprintf(
"/projects/%s/statuses/%s",
strings.Replace(build.Project.Slug, "/", "%2F", 1),
strings.Replace(build.Project.Slug, "/", "%2F", -1),
build.MergeRequest.Sha), values)
if err != nil {
......
......@@ -82,7 +82,7 @@ func createGitlabHook(project Project) error {
serverUrl := fmt.Sprintf(
"%s/hook", confd.StringDefault("server.domain", "http://localhost:8181"))
path := fmt.Sprintf(
"/projects/%s/hooks", strings.Replace(project.Slug, "/", "%2F", 1))
"/projects/%s/hooks", strings.Replace(project.Slug, "/", "%2F", -1))
resp, err := project.ApiRequest("GET", path, url.Values{})
if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment