diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2018-06-20 22:39:07 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2018-06-20 22:39:07 +0100 |
commit | de6d2c524430287c699aaa898c1325da6afea539 (patch) | |
tree | f78eb841208d667668a7bc92a9290d693cc7103b /vendor/github.com/xanzy/go-gitlab/branches.go | |
parent | eb99016e1629e690e55633de6fc63a14c53e7ea2 (diff) |
Update dependencies
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/branches.go')
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/branches.go | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/branches.go b/vendor/github.com/xanzy/go-gitlab/branches.go index a792e3f..3f7bd0c 100644 --- a/vendor/github.com/xanzy/go-gitlab/branches.go +++ b/vendor/github.com/xanzy/go-gitlab/branches.go @@ -49,9 +49,7 @@ func (b Branch) String() string { // // GitLab API docs: // https://docs.gitlab.com/ce/api/branches.html#list-repository-branches -type ListBranchesOptions struct { - ListOptions -} +type ListBranchesOptions ListOptions // ListBranches gets a list of repository branches from a project, sorted by // name alphabetically. @@ -88,7 +86,7 @@ func (s *BranchesService) GetBranch(pid interface{}, branch string, options ...O if err != nil { return nil, nil, err } - u := fmt.Sprintf("projects/%s/repository/branches/%s", url.QueryEscape(project), branch) + u := fmt.Sprintf("projects/%s/repository/branches/%s", url.QueryEscape(project), url.QueryEscape(branch)) req, err := s.client.NewRequest("GET", u, nil, options) if err != nil { @@ -124,7 +122,7 @@ func (s *BranchesService) ProtectBranch(pid interface{}, branch string, opts *Pr if err != nil { return nil, nil, err } - u := fmt.Sprintf("projects/%s/repository/branches/%s/protect", url.QueryEscape(project), branch) + u := fmt.Sprintf("projects/%s/repository/branches/%s/protect", url.QueryEscape(project), url.QueryEscape(branch)) req, err := s.client.NewRequest("PUT", u, opts, options) if err != nil { @@ -151,7 +149,7 @@ func (s *BranchesService) UnprotectBranch(pid interface{}, branch string, option if err != nil { return nil, nil, err } - u := fmt.Sprintf("projects/%s/repository/branches/%s/unprotect", url.QueryEscape(project), branch) + u := fmt.Sprintf("projects/%s/repository/branches/%s/unprotect", url.QueryEscape(project), url.QueryEscape(branch)) req, err := s.client.NewRequest("PUT", u, nil, options) if err != nil { @@ -210,7 +208,7 @@ func (s *BranchesService) DeleteBranch(pid interface{}, branch string, options . if err != nil { return nil, err } - u := fmt.Sprintf("projects/%s/repository/branches/%s", url.QueryEscape(project), branch) + u := fmt.Sprintf("projects/%s/repository/branches/%s", url.QueryEscape(project), url.QueryEscape(branch)) req, err := s.client.NewRequest("DELETE", u, nil, options) if err != nil { |