Commit b1362a3b authored by Sander van Harmelen's avatar Sander van Harmelen

Fix issue #253

parent 1057577b
...@@ -104,7 +104,7 @@ func (s *JobsService) ListPipelineJobs(pid interface{}, pipelineID int, opts *Li ...@@ -104,7 +104,7 @@ func (s *JobsService) ListPipelineJobs(pid interface{}, pipelineID int, opts *Li
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
u := fmt.Sprintf("projects/%s/pipelines/%d/jobs", project, pipelineID) u := fmt.Sprintf("projects/%s/pipelines/%d/jobs", url.QueryEscape(project), pipelineID)
req, err := s.client.NewRequest("GET", u, opts, options) req, err := s.client.NewRequest("GET", u, opts, options)
if err != nil { if err != nil {
...@@ -129,7 +129,7 @@ func (s *JobsService) GetJob(pid interface{}, jobID int, options ...OptionFunc) ...@@ -129,7 +129,7 @@ func (s *JobsService) GetJob(pid interface{}, jobID int, options ...OptionFunc)
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
u := fmt.Sprintf("projects/%s/jobs/%d", project, jobID) u := fmt.Sprintf("projects/%s/jobs/%d", url.QueryEscape(project), jobID)
req, err := s.client.NewRequest("GET", u, nil, options) req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil { if err != nil {
...@@ -154,7 +154,7 @@ func (s *JobsService) GetJobArtifacts(pid interface{}, jobID int, options ...Opt ...@@ -154,7 +154,7 @@ func (s *JobsService) GetJobArtifacts(pid interface{}, jobID int, options ...Opt
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
u := fmt.Sprintf("projects/%s/jobs/%d/artifacts", project, jobID) u := fmt.Sprintf("projects/%s/jobs/%d/artifacts", url.QueryEscape(project), jobID)
req, err := s.client.NewRequest("GET", u, nil, options) req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil { if err != nil {
...@@ -180,7 +180,7 @@ func (s *JobsService) DownloadArtifactsFile(pid interface{}, refName string, job ...@@ -180,7 +180,7 @@ func (s *JobsService) DownloadArtifactsFile(pid interface{}, refName string, job
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
u := fmt.Sprintf("projects/%s/jobs/artifacts/%s/download?job=%s", project, refName, job) u := fmt.Sprintf("projects/%s/jobs/artifacts/%s/download?job=%s", url.QueryEscape(project), refName, job)
req, err := s.client.NewRequest("GET", u, nil, options) req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil { if err != nil {
...@@ -205,7 +205,7 @@ func (s *JobsService) GetTraceFile(pid interface{}, jobID int, options ...Option ...@@ -205,7 +205,7 @@ func (s *JobsService) GetTraceFile(pid interface{}, jobID int, options ...Option
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
u := fmt.Sprintf("projects/%s/jobs/%d/trace", project, jobID) u := fmt.Sprintf("projects/%s/jobs/%d/trace", url.QueryEscape(project), jobID)
req, err := s.client.NewRequest("GET", u, nil, options) req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil { if err != nil {
...@@ -230,7 +230,7 @@ func (s *JobsService) CancelJob(pid interface{}, jobID int, options ...OptionFun ...@@ -230,7 +230,7 @@ func (s *JobsService) CancelJob(pid interface{}, jobID int, options ...OptionFun
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
u := fmt.Sprintf("projects/%s/jobs/%d/cancel", project, jobID) u := fmt.Sprintf("projects/%s/jobs/%d/cancel", url.QueryEscape(project), jobID)
req, err := s.client.NewRequest("POST", u, nil, options) req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil { if err != nil {
...@@ -255,7 +255,7 @@ func (s *JobsService) RetryJob(pid interface{}, jobID int, options ...OptionFunc ...@@ -255,7 +255,7 @@ func (s *JobsService) RetryJob(pid interface{}, jobID int, options ...OptionFunc
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
u := fmt.Sprintf("projects/%s/jobs/%d/retry", project, jobID) u := fmt.Sprintf("projects/%s/jobs/%d/retry", url.QueryEscape(project), jobID)
req, err := s.client.NewRequest("POST", u, nil, options) req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil { if err != nil {
...@@ -281,7 +281,7 @@ func (s *JobsService) EraseJob(pid interface{}, jobID int, options ...OptionFunc ...@@ -281,7 +281,7 @@ func (s *JobsService) EraseJob(pid interface{}, jobID int, options ...OptionFunc
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
u := fmt.Sprintf("projects/%s/jobs/%d/erase", project, jobID) u := fmt.Sprintf("projects/%s/jobs/%d/erase", url.QueryEscape(project), jobID)
req, err := s.client.NewRequest("POST", u, nil, options) req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil { if err != nil {
...@@ -307,7 +307,7 @@ func (s *JobsService) KeepArtifacts(pid interface{}, jobID int, options ...Optio ...@@ -307,7 +307,7 @@ func (s *JobsService) KeepArtifacts(pid interface{}, jobID int, options ...Optio
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
u := fmt.Sprintf("projects/%s/jobs/%d/artifacts/keep", project, jobID) u := fmt.Sprintf("projects/%s/jobs/%d/artifacts/keep", url.QueryEscape(project), jobID)
req, err := s.client.NewRequest("POST", u, nil, options) req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil { if err != nil {
...@@ -332,7 +332,7 @@ func (s *JobsService) PlayJob(pid interface{}, jobID int, options ...OptionFunc) ...@@ -332,7 +332,7 @@ func (s *JobsService) PlayJob(pid interface{}, jobID int, options ...OptionFunc)
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
u := fmt.Sprintf("projects/%s/jobs/%d/play", project, jobID) u := fmt.Sprintf("projects/%s/jobs/%d/play", url.QueryEscape(project), jobID)
req, err := s.client.NewRequest("POST", u, nil, options) req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil { 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