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
//
// GitLab API docs:
// 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)
if err != nil {
return nil, nil, err
return nil, err
}
u := fmt.Sprintf("projects/%s/pipeline_schedules/%d", url.QueryEscape(project), schedule)
req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, nil, err
return nil, err
}
p := new(PipelineSchedule)
resp, err := s.client.Do(req, p)
req, err = s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, resp, err
return nil, err
}
return p, resp, err
return s.client.Do(req, nil)
}
// 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