aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/xanzy/go-gitlab/projects.go
diff options
context:
space:
mode:
authorAmine <hilalyamine@gmail.com>2019-08-17 01:30:43 +0200
committerGitHub <noreply@github.com>2019-08-17 01:30:43 +0200
commita3815d2ebb7d4a12d7b0db434b0b244e03e5e98a (patch)
tree0e10ace59017ee38f5d627410cdf38a478f6f6be /vendor/github.com/xanzy/go-gitlab/projects.go
parentcf960bc7a5bd0b7af28d35de33131fb0b5ce5253 (diff)
parentf6280a22c76ee42545efc31a6e3a35ff65954f3b (diff)
downloadgit-bug-a3815d2ebb7d4a12d7b0db434b0b244e03e5e98a.tar.gz
Merge pull request #196 from MichaelMure/dependabot/dep/github.com/xanzy/go-gitlab-0.20.0
build(deps): bump github.com/xanzy/go-gitlab from 0.19.0 to 0.20.0
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/projects.go')
-rw-r--r--vendor/github.com/xanzy/go-gitlab/projects.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/projects.go b/vendor/github.com/xanzy/go-gitlab/projects.go
index 93855cf4..b6c513fa 100644
--- a/vendor/github.com/xanzy/go-gitlab/projects.go
+++ b/vendor/github.com/xanzy/go-gitlab/projects.go
@@ -1342,3 +1342,27 @@ func (s *ProjectsService) ChangeAllowedApprovers(pid interface{}, opt *ChangeAll
return pa, resp, err
}
+
+// StartMirroringProject 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
+}