[Vendor] Update xanzy/go-gitlab v0.31.0 => v0.37.0 (#12701)

* update github.com/xanzy/go-gitlab v0.31.0 => v0.37.0

* vendor

* adapt changes

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
6543 2020-09-06 17:37:53 +02:00 committed by GitHub
parent 0ed5e103fe
commit 0c6a802731
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 2436 additions and 776 deletions

View file

@ -230,6 +230,25 @@ func (s *PipelineSchedulesService) DeletePipelineSchedule(pid interface{}, sched
return s.client.Do(req, nil)
}
// RunPipelineSchedule triggers a new scheduled pipeline to run immediately.
//
// Gitlab API docs:
// https://docs.gitlab.com/ce/api/pipeline_schedules.html#run-a-scheduled-pipeline-immediately
func (s *PipelineSchedulesService) RunPipelineSchedule(pid interface{}, schedule int, options ...RequestOptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/pipeline_schedules/%d/play", pathEscape(project), schedule)
req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil {
return nil, err
}
return s.client.Do(req, nil)
}
// CreatePipelineScheduleVariableOptions represents the available
// CreatePipelineScheduleVariable() options.
//