From f6280a22c76ee42545efc31a6e3a35ff65954f3b Mon Sep 17 00:00:00 2001 From: Amine Hilaly Date: Sat, 17 Aug 2019 00:28:45 +0200 Subject: vendor: upgrade github/xanzy/go-gitlab version to 0.20.0 --- vendor/github.com/xanzy/go-gitlab/protected_branches.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vendor/github.com/xanzy/go-gitlab/protected_branches.go') diff --git a/vendor/github.com/xanzy/go-gitlab/protected_branches.go b/vendor/github.com/xanzy/go-gitlab/protected_branches.go index 4950ecc2..3567f6eb 100644 --- a/vendor/github.com/xanzy/go-gitlab/protected_branches.go +++ b/vendor/github.com/xanzy/go-gitlab/protected_branches.go @@ -18,6 +18,7 @@ package gitlab import ( "fmt" + "net/url" ) // ProtectedBranchesService handles communication with the protected branch @@ -90,7 +91,7 @@ func (s *ProtectedBranchesService) GetProtectedBranch(pid interface{}, branch st if err != nil { return nil, nil, err } - u := fmt.Sprintf("projects/%s/protected_branches/%s", pathEscape(project), branch) + u := fmt.Sprintf("projects/%s/protected_branches/%s", pathEscape(project), url.PathEscape(branch)) req, err := s.client.NewRequest("GET", u, nil, options) if err != nil { @@ -153,7 +154,7 @@ func (s *ProtectedBranchesService) UnprotectRepositoryBranches(pid interface{}, if err != nil { return nil, err } - u := fmt.Sprintf("projects/%s/protected_branches/%s", pathEscape(project), branch) + u := fmt.Sprintf("projects/%s/protected_branches/%s", pathEscape(project), url.PathEscape(branch)) req, err := s.client.NewRequest("DELETE", u, nil, options) if err != nil { -- cgit