Add support for triggering a project mirroring process

Signed-off-by: 's avatarDowideit, Sven (O&amp;A, St. Lucia) <Sven.Dowideit@csiro.au>
parent ee3313ca
......@@ -1342,3 +1342,27 @@ func (s *ProjectsService) ChangeAllowedApprovers(pid interface{}, opt *ChangeAll
return pa, resp, err
}
// StartPullMirroringProject Start the pull mirroring process for a Project.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/projects.html#start-the-pull-mirroring-process-for-a-project-starter
func (s *ProjectsService) StartMirroringProject(pid interface{}, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/mirror/pull", pathEscape(project))
req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil {
return nil, err
}
resp, err := s.client.Do(req, nil)
if err != nil {
return resp, err
}
return resp, err
}
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