Unverified Commit 2f6596be authored by Sander van Harmelen's avatar Sander van Harmelen Committed by GitHub

Merge pull request #607 from thojkooi/fix-deletepipelineschedule-error

fix DeletePipelineSchedule always returning an error due to EOF
parents 8e773904 f30d993a
...@@ -216,25 +216,24 @@ func (s *PipelineSchedulesService) TakeOwnershipOfPipelineSchedule(pid interface ...@@ -216,25 +216,24 @@ func (s *PipelineSchedulesService) TakeOwnershipOfPipelineSchedule(pid interface
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/pipeline_schedules.html#delete-a-pipeline-schedule // https://docs.gitlab.com/ce/api/pipeline_schedules.html#delete-a-pipeline-schedule
func (s *PipelineSchedulesService) DeletePipelineSchedule(pid interface{}, schedule int, options ...OptionFunc) (*PipelineSchedule, *Response, error) { func (s *PipelineSchedulesService) DeletePipelineSchedule(pid interface{}, schedule int, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
return nil, nil, err return nil, err
} }
u := fmt.Sprintf("projects/%s/pipeline_schedules/%d", url.QueryEscape(project), schedule) u := fmt.Sprintf("projects/%s/pipeline_schedules/%d", url.QueryEscape(project), schedule)
req, err := s.client.NewRequest("DELETE", u, nil, options) req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil { if err != nil {
return nil, nil, err return nil, err
} }
p := new(PipelineSchedule) req, err = s.client.NewRequest("DELETE", u, nil, options)
resp, err := s.client.Do(req, p)
if err != nil { if err != nil {
return nil, resp, err return nil, err
} }
return p, resp, err return s.client.Do(req, nil)
} }
// CreatePipelineScheduleVariableOptions represents the available // CreatePipelineScheduleVariableOptions represents the available
......
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