diff options
author | Amine <hilalyamine@gmail.com> | 2019-08-17 01:30:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-17 01:30:43 +0200 |
commit | a3815d2ebb7d4a12d7b0db434b0b244e03e5e98a (patch) | |
tree | 0e10ace59017ee38f5d627410cdf38a478f6f6be /vendor/github.com/xanzy/go-gitlab/protected_branches.go | |
parent | cf960bc7a5bd0b7af28d35de33131fb0b5ce5253 (diff) | |
parent | f6280a22c76ee42545efc31a6e3a35ff65954f3b (diff) | |
download | git-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/protected_branches.go')
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/protected_branches.go | 5 |
1 files changed, 3 insertions, 2 deletions
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 { |