Repository: xanzy/go-gitlab
Pull request #1313 (2021-12-13 01:04:03)

Expose PathEscape
I found it useful when doing GitLab interaction using this package when there are cases that I have to construct URLs myself (like when package does not yet support something).


Patch:
diff --git a/access_requests.go b/access_requests.go
index ebd6d84..f2cefe6 100644
--- a/access_requests.go
+++ b/access_requests.go
@@ -61,7 +61,7 @@ func (s *AccessRequestsService) ListProjectAccessRequests(pid interface{}, opt *
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/access_requests", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/access_requests", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -87,7 +87,7 @@ func (s *AccessRequestsService) ListGroupAccessRequests(gid interface{}, opt *Li
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/access_requests", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/access_requests", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -113,7 +113,7 @@ func (s *AccessRequestsService) RequestProjectAccess(pid interface{}, options ..
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/access_requests", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/access_requests", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -139,7 +139,7 @@ func (s *AccessRequestsService) RequestGroupAccess(gid interface{}, options ...R
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/access_requests", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/access_requests", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -173,7 +173,7 @@ func (s *AccessRequestsService) ApproveProjectAccessRequest(pid interface{}, use
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/access_requests/%d/approve", pathEscape(project), user)
+	u := fmt.Sprintf("projects/%s/access_requests/%d/approve", PathEscape(project), user)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -198,7 +198,7 @@ func (s *AccessRequestsService) ApproveGroupAccessRequest(gid interface{}, user
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/access_requests/%d/approve", pathEscape(group), user)
+	u := fmt.Sprintf("groups/%s/access_requests/%d/approve", PathEscape(group), user)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -223,7 +223,7 @@ func (s *AccessRequestsService) DenyProjectAccessRequest(pid interface{}, user i
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/access_requests/%d", pathEscape(project), user)
+	u := fmt.Sprintf("projects/%s/access_requests/%d", PathEscape(project), user)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -242,7 +242,7 @@ func (s *AccessRequestsService) DenyGroupAccessRequest(gid interface{}, user int
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/access_requests/%d", pathEscape(group), user)
+	u := fmt.Sprintf("groups/%s/access_requests/%d", PathEscape(group), user)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/audit_events.go b/audit_events.go
index 5b54a67..bdae200 100644
--- a/audit_events.go
+++ b/audit_events.go
@@ -108,7 +108,7 @@ func (s *AuditEventsService) ListGroupAuditEvents(gid interface{}, opt *ListAudi
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/audit_events", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/audit_events", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -132,7 +132,7 @@ func (s *AuditEventsService) GetGroupAuditEvent(gid interface{}, event int, opti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/audit_events/%d", pathEscape(group), event)
+	u := fmt.Sprintf("groups/%s/audit_events/%d", PathEscape(group), event)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -157,7 +157,7 @@ func (s *AuditEventsService) ListProjectAuditEvents(pid interface{}, opt *ListAu
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/audit_events", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/audit_events", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -182,7 +182,7 @@ func (s *AuditEventsService) GetProjectAuditEvent(pid interface{}, event int, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/audit_events/%d", pathEscape(project), event)
+	u := fmt.Sprintf("projects/%s/audit_events/%d", PathEscape(project), event)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
diff --git a/award_emojis.go b/award_emojis.go
index 8ee08bf..cb138db 100644
--- a/award_emojis.go
+++ b/award_emojis.go
@@ -93,7 +93,7 @@ func (s *AwardEmojiService) listAwardEmoji(pid interface{}, resource string, res
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/%s/%d/award_emoji",
-		pathEscape(project),
+		PathEscape(project),
 		resource,
 		resourceID,
 	)
@@ -142,7 +142,7 @@ func (s *AwardEmojiService) getAwardEmoji(pid interface{}, resource string, reso
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/%s/%d/award_emoji/%d",
-		pathEscape(project),
+		PathEscape(project),
 		resource,
 		resourceID,
 		awardID,
@@ -201,7 +201,7 @@ func (s *AwardEmojiService) createAwardEmoji(pid interface{}, resource string, r
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/%s/%d/award_emoji",
-		pathEscape(project),
+		PathEscape(project),
 		resource,
 		resourceID,
 	)
@@ -253,7 +253,7 @@ func (s *AwardEmojiService) deleteAwardEmoji(pid interface{}, resource string, r
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/%s/%d/award_emoji/%d", pathEscape(project), resource,
+	u := fmt.Sprintf("projects/%s/%s/%d/award_emoji/%d", PathEscape(project), resource,
 		resourceID, awardID)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
@@ -295,7 +295,7 @@ func (s *AwardEmojiService) listAwardEmojiOnNote(pid interface{}, resources stri
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/%s/%d/notes/%d/award_emoji", pathEscape(project), resources,
+	u := fmt.Sprintf("projects/%s/%s/%d/notes/%d/award_emoji", PathEscape(project), resources,
 		ressourceID, noteID)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
@@ -344,7 +344,7 @@ func (s *AwardEmojiService) getSingleNoteAwardEmoji(pid interface{}, ressource s
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/%s/%d/notes/%d/award_emoji/%d",
-		pathEscape(project),
+		PathEscape(project),
 		ressource,
 		resourceID,
 		noteID,
@@ -400,7 +400,7 @@ func (s *AwardEmojiService) createAwardEmojiOnNote(pid interface{}, resource str
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/%s/%d/notes/%d/award_emoji",
-		pathEscape(project),
+		PathEscape(project),
 		resource,
 		resourceID,
 		noteID,
@@ -452,7 +452,7 @@ func (s *AwardEmojiService) deleteAwardEmojiOnNote(pid interface{}, resource str
 		return nil, err
 	}
 	u := fmt.Sprintf("projects/%s/%s/%d/notes/%d/award_emoji/%d",
-		pathEscape(project),
+		PathEscape(project),
 		resource,
 		resourceID,
 		noteID,
diff --git a/boards.go b/boards.go
index ef85023..c690dbb 100644
--- a/boards.go
+++ b/boards.go
@@ -72,7 +72,7 @@ func (s *IssueBoardsService) CreateIssueBoard(pid interface{}, opt *CreateIssueB
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/boards", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/boards", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -107,7 +107,7 @@ func (s *IssueBoardsService) UpdateIssueBoard(pid interface{}, board int, opt *U
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/boards/%d", pathEscape(project), board)
+	u := fmt.Sprintf("projects/%s/boards/%d", PathEscape(project), board)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -131,7 +131,7 @@ func (s *IssueBoardsService) DeleteIssueBoard(pid interface{}, board int, option
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/boards/%d", pathEscape(project), board)
+	u := fmt.Sprintf("projects/%s/boards/%d", PathEscape(project), board)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -154,7 +154,7 @@ func (s *IssueBoardsService) ListIssueBoards(pid interface{}, opt *ListIssueBoar
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/boards", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/boards", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -178,7 +178,7 @@ func (s *IssueBoardsService) GetIssueBoard(pid interface{}, board int, options .
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/boards/%d", pathEscape(project), board)
+	u := fmt.Sprintf("projects/%s/boards/%d", PathEscape(project), board)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -208,7 +208,7 @@ func (s *IssueBoardsService) GetIssueBoardLists(pid interface{}, board int, opt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/boards/%d/lists", pathEscape(project), board)
+	u := fmt.Sprintf("projects/%s/boards/%d/lists", PathEscape(project), board)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -233,7 +233,7 @@ func (s *IssueBoardsService) GetIssueBoardList(pid interface{}, board, list int,
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/boards/%d/lists/%d",
-		pathEscape(project),
+		PathEscape(project),
 		board,
 		list,
 	)
@@ -268,7 +268,7 @@ func (s *IssueBoardsService) CreateIssueBoardList(pid interface{}, board int, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/boards/%d/lists", pathEscape(project), board)
+	u := fmt.Sprintf("projects/%s/boards/%d/lists", PathEscape(project), board)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -301,7 +301,7 @@ func (s *IssueBoardsService) UpdateIssueBoardList(pid interface{}, board, list i
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/boards/%d/lists/%d",
-		pathEscape(project),
+		PathEscape(project),
 		board,
 		list,
 	)
@@ -331,7 +331,7 @@ func (s *IssueBoardsService) DeleteIssueBoardList(pid interface{}, board, list i
 		return nil, err
 	}
 	u := fmt.Sprintf("projects/%s/boards/%d/lists/%d",
-		pathEscape(project),
+		PathEscape(project),
 		board,
 		list,
 	)
diff --git a/branches.go b/branches.go
index 7128562..246cb57 100644
--- a/branches.go
+++ b/branches.go
@@ -68,7 +68,7 @@ func (s *BranchesService) ListBranches(pid interface{}, opts *ListBranchesOption
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/branches", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/repository/branches", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opts, options)
 	if err != nil {
@@ -93,7 +93,7 @@ func (s *BranchesService) GetBranch(pid interface{}, branch string, options ...R
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/branches/%s", pathEscape(project), url.PathEscape(branch))
+	u := fmt.Sprintf("projects/%s/repository/branches/%s", PathEscape(project), url.PathEscape(branch))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -129,7 +129,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", pathEscape(project), url.PathEscape(branch))
+	u := fmt.Sprintf("projects/%s/repository/branches/%s/protect", PathEscape(project), url.PathEscape(branch))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opts, options)
 	if err != nil {
@@ -156,7 +156,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", pathEscape(project), url.PathEscape(branch))
+	u := fmt.Sprintf("projects/%s/repository/branches/%s/unprotect", PathEscape(project), url.PathEscape(branch))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, nil, options)
 	if err != nil {
@@ -190,7 +190,7 @@ func (s *BranchesService) CreateBranch(pid interface{}, opt *CreateBranchOptions
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/branches", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/repository/branches", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -215,7 +215,7 @@ func (s *BranchesService) DeleteBranch(pid interface{}, branch string, options .
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/branches/%s", pathEscape(project), url.PathEscape(branch))
+	u := fmt.Sprintf("projects/%s/repository/branches/%s", PathEscape(project), url.PathEscape(branch))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -234,7 +234,7 @@ func (s *BranchesService) DeleteMergedBranches(pid interface{}, options ...Reque
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/merged_branches", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/repository/merged_branches", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/ci_yml_templates.go b/ci_yml_templates.go
index da447c1..fb4e22b 100644
--- a/ci_yml_templates.go
+++ b/ci_yml_templates.go
@@ -69,7 +69,7 @@ func (s *CIYMLTemplatesService) ListAllTemplates(opt *ListCIYMLTemplatesOptions,
 // GitLab API docs:
 // https://docs.gitlab.com/ce/api/templates/gitlab_ci_ymls.html#single-gitlab-ci-yml-template
 func (s *CIYMLTemplatesService) GetTemplate(key string, options ...RequestOptionFunc) (*CIYMLTemplate, *Response, error) {
-	u := fmt.Sprintf("templates/gitlab_ci_ymls/%s", pathEscape(key))
+	u := fmt.Sprintf("templates/gitlab_ci_ymls/%s", PathEscape(key))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
diff --git a/commits.go b/commits.go
index 491fbd6..fd26624 100644
--- a/commits.go
+++ b/commits.go
@@ -89,7 +89,7 @@ func (s *CommitsService) ListCommits(pid interface{}, opt *ListCommitsOptions, o
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/commits", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/repository/commits", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -132,7 +132,7 @@ func (s *CommitsService) GetCommitRefs(pid interface{}, sha string, opt *GetComm
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/commits/%s/refs", pathEscape(project), url.PathEscape(sha))
+	u := fmt.Sprintf("projects/%s/repository/commits/%s/refs", PathEscape(project), url.PathEscape(sha))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -160,7 +160,7 @@ func (s *CommitsService) GetCommit(pid interface{}, sha string, options ...Reque
 	if sha == "" {
 		return nil, nil, fmt.Errorf("SHA must be a non-empty string")
 	}
-	u := fmt.Sprintf("projects/%s/repository/commits/%s", pathEscape(project), url.PathEscape(sha))
+	u := fmt.Sprintf("projects/%s/repository/commits/%s", PathEscape(project), url.PathEscape(sha))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -214,7 +214,7 @@ func (s *CommitsService) CreateCommit(pid interface{}, opt *CreateCommitOptions,
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/commits", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/repository/commits", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -263,7 +263,7 @@ func (s *CommitsService) GetCommitDiff(pid interface{}, sha string, opt *GetComm
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/commits/%s/diff", pathEscape(project), url.PathEscape(sha))
+	u := fmt.Sprintf("projects/%s/repository/commits/%s/diff", PathEscape(project), url.PathEscape(sha))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -320,7 +320,7 @@ func (s *CommitsService) GetCommitComments(pid interface{}, sha string, opt *Get
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/commits/%s/comments", pathEscape(project), url.PathEscape(sha))
+	u := fmt.Sprintf("projects/%s/repository/commits/%s/comments", PathEscape(project), url.PathEscape(sha))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -359,7 +359,7 @@ func (s *CommitsService) PostCommitComment(pid interface{}, sha string, opt *Pos
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/commits/%s/comments", pathEscape(project), url.PathEscape(sha))
+	u := fmt.Sprintf("projects/%s/repository/commits/%s/comments", PathEscape(project), url.PathEscape(sha))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -412,7 +412,7 @@ func (s *CommitsService) GetCommitStatuses(pid interface{}, sha string, opt *Get
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/commits/%s/statuses", pathEscape(project), url.PathEscape(sha))
+	u := fmt.Sprintf("projects/%s/repository/commits/%s/statuses", PathEscape(project), url.PathEscape(sha))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -450,7 +450,7 @@ func (s *CommitsService) SetCommitStatus(pid interface{}, sha string, opt *SetCo
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/statuses/%s", pathEscape(project), url.PathEscape(sha))
+	u := fmt.Sprintf("projects/%s/statuses/%s", PathEscape(project), url.PathEscape(sha))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -475,7 +475,7 @@ func (s *CommitsService) ListMergeRequestsByCommit(pid interface{}, sha string,
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/commits/%s/merge_requests", pathEscape(project), url.PathEscape(sha))
+	u := fmt.Sprintf("projects/%s/repository/commits/%s/merge_requests", PathEscape(project), url.PathEscape(sha))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -508,7 +508,7 @@ func (s *CommitsService) CherryPickCommit(pid interface{}, sha string, opt *Cher
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/commits/%s/cherry_pick", pathEscape(project), url.PathEscape(sha))
+	u := fmt.Sprintf("projects/%s/repository/commits/%s/cherry_pick", PathEscape(project), url.PathEscape(sha))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -539,7 +539,7 @@ func (s *CommitsService) RevertCommit(pid interface{}, sha string, opt *RevertCo
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/commits/%s/revert", pathEscape(project), url.PathEscape(sha))
+	u := fmt.Sprintf("projects/%s/repository/commits/%s/revert", PathEscape(project), url.PathEscape(sha))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -576,7 +576,7 @@ func (s *CommitsService) GetGPGSiganature(pid interface{}, sha string, options .
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/commits/%s/signature", pathEscape(project), url.PathEscape(sha))
+	u := fmt.Sprintf("projects/%s/repository/commits/%s/signature", PathEscape(project), url.PathEscape(sha))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
diff --git a/container_registry.go b/container_registry.go
index 011a6ce..43bc3d8 100644
--- a/container_registry.go
+++ b/container_registry.go
@@ -86,7 +86,7 @@ func (s *ContainerRegistryService) ListProjectRegistryRepositories(pid interface
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/registry/repositories", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/registry/repositories", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -111,7 +111,7 @@ func (s *ContainerRegistryService) ListGroupRegistryRepositories(gid interface{}
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/registry/repositories", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/registry/repositories", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -146,7 +146,7 @@ func (s *ContainerRegistryService) GetSingleRegistryRepository(pid interface{},
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("registry/repositories/%s", pathEscape(project))
+	u := fmt.Sprintf("registry/repositories/%s", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -171,7 +171,7 @@ func (s *ContainerRegistryService) DeleteRegistryRepository(pid interface{}, rep
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/registry/repositories/%d", pathEscape(project), repository)
+	u := fmt.Sprintf("projects/%s/registry/repositories/%d", PathEscape(project), repository)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -198,7 +198,7 @@ func (s *ContainerRegistryService) ListRegistryRepositoryTags(pid interface{}, r
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/registry/repositories/%d/tags",
-		pathEscape(project),
+		PathEscape(project),
 		repository,
 	)
 
@@ -226,7 +226,7 @@ func (s *ContainerRegistryService) GetRegistryRepositoryTagDetail(pid interface{
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/registry/repositories/%d/tags/%s",
-		pathEscape(project),
+		PathEscape(project),
 		repository,
 		tagName,
 	)
@@ -255,7 +255,7 @@ func (s *ContainerRegistryService) DeleteRegistryRepositoryTag(pid interface{},
 		return nil, err
 	}
 	u := fmt.Sprintf("projects/%s/registry/repositories/%d/tags/%s",
-		pathEscape(project),
+		PathEscape(project),
 		repository,
 		tagName,
 	)
@@ -294,7 +294,7 @@ func (s *ContainerRegistryService) DeleteRegistryRepositoryTags(pid interface{},
 		return nil, err
 	}
 	u := fmt.Sprintf("projects/%s/registry/repositories/%d/tags",
-		pathEscape(project),
+		PathEscape(project),
 		repository,
 	)
 
diff --git a/deploy_keys.go b/deploy_keys.go
index 914f46e..14ba0c8 100644
--- a/deploy_keys.go
+++ b/deploy_keys.go
@@ -78,7 +78,7 @@ func (s *DeployKeysService) ListProjectDeployKeys(pid interface{}, opt *ListProj
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/deploy_keys", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/deploy_keys", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -103,7 +103,7 @@ func (s *DeployKeysService) GetDeployKey(pid interface{}, deployKey int, options
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/deploy_keys/%d", pathEscape(project), deployKey)
+	u := fmt.Sprintf("projects/%s/deploy_keys/%d", PathEscape(project), deployKey)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -140,7 +140,7 @@ func (s *DeployKeysService) AddDeployKey(pid interface{}, opt *AddDeployKeyOptio
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/deploy_keys", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/deploy_keys", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -165,7 +165,7 @@ func (s *DeployKeysService) DeleteDeployKey(pid interface{}, deployKey int, opti
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/deploy_keys/%d", pathEscape(project), deployKey)
+	u := fmt.Sprintf("projects/%s/deploy_keys/%d", PathEscape(project), deployKey)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -184,7 +184,7 @@ func (s *DeployKeysService) EnableDeployKey(pid interface{}, deployKey int, opti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/deploy_keys/%d/enable", pathEscape(project), deployKey)
+	u := fmt.Sprintf("projects/%s/deploy_keys/%d/enable", PathEscape(project), deployKey)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -218,7 +218,7 @@ func (s *DeployKeysService) UpdateDeployKey(pid interface{}, deployKey int, opt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/deploy_keys/%d", pathEscape(project), deployKey)
+	u := fmt.Sprintf("projects/%s/deploy_keys/%d", PathEscape(project), deployKey)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
diff --git a/deploy_tokens.go b/deploy_tokens.go
index 2082f96..e18edd4 100644
--- a/deploy_tokens.go
+++ b/deploy_tokens.go
@@ -79,7 +79,7 @@ func (s *DeployTokensService) ListProjectDeployTokens(pid interface{}, opt *List
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/deploy_tokens", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/deploy_tokens", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -115,7 +115,7 @@ func (s *DeployTokensService) CreateProjectDeployToken(pid interface{}, opt *Cre
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/deploy_tokens", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/deploy_tokens", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -140,7 +140,7 @@ func (s *DeployTokensService) DeleteProjectDeployToken(pid interface{}, deployTo
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/deploy_tokens/%d", pathEscape(project), deployToken)
+	u := fmt.Sprintf("projects/%s/deploy_tokens/%d", PathEscape(project), deployToken)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -166,7 +166,7 @@ func (s *DeployTokensService) ListGroupDeployTokens(gid interface{}, opt *ListGr
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/deploy_tokens", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/deploy_tokens", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -202,7 +202,7 @@ func (s *DeployTokensService) CreateGroupDeployToken(gid interface{}, opt *Creat
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/deploy_tokens", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/deploy_tokens", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -227,7 +227,7 @@ func (s *DeployTokensService) DeleteGroupDeployToken(gid interface{}, deployToke
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/deploy_tokens/%d", pathEscape(group), deployToken)
+	u := fmt.Sprintf("groups/%s/deploy_tokens/%d", PathEscape(group), deployToken)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/deployments.go b/deployments.go
index d6b8bbd..cfa963b 100644
--- a/deployments.go
+++ b/deployments.go
@@ -94,7 +94,7 @@ func (s *DeploymentsService) ListProjectDeployments(pid interface{}, opts *ListP
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/deployments", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/deployments", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opts, options)
 	if err != nil {
@@ -118,7 +118,7 @@ func (s *DeploymentsService) GetProjectDeployment(pid interface{}, deployment in
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/deployments/%d", pathEscape(project), deployment)
+	u := fmt.Sprintf("projects/%s/deployments/%d", PathEscape(project), deployment)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -154,7 +154,7 @@ func (s *DeploymentsService) CreateProjectDeployment(pid interface{}, opt *Creat
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/deployments", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/deployments", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -186,7 +186,7 @@ func (s *DeploymentsService) UpdateProjectDeployment(pid interface{}, deployment
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/deployments/%d", pathEscape(project), deployment)
+	u := fmt.Sprintf("projects/%s/deployments/%d", PathEscape(project), deployment)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
diff --git a/discussions.go b/discussions.go
index 2a8562d..c8f8668 100644
--- a/discussions.go
+++ b/discussions.go
@@ -60,7 +60,7 @@ func (s *DiscussionsService) ListIssueDiscussions(pid interface{}, issue int, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/discussions", pathEscape(project), issue)
+	u := fmt.Sprintf("projects/%s/issues/%d/discussions", PathEscape(project), issue)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -86,7 +86,7 @@ func (s *DiscussionsService) GetIssueDiscussion(pid interface{}, issue int, disc
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/issues/%d/discussions/%s",
-		pathEscape(project),
+		PathEscape(project),
 		issue,
 		discussion,
 	)
@@ -124,7 +124,7 @@ func (s *DiscussionsService) CreateIssueDiscussion(pid interface{}, issue int, o
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/discussions", pathEscape(project), issue)
+	u := fmt.Sprintf("projects/%s/issues/%d/discussions", PathEscape(project), issue)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -160,7 +160,7 @@ func (s *DiscussionsService) AddIssueDiscussionNote(pid interface{}, issue int,
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/issues/%d/discussions/%s/notes",
-		pathEscape(project),
+		PathEscape(project),
 		issue,
 		discussion,
 	)
@@ -199,7 +199,7 @@ func (s *DiscussionsService) UpdateIssueDiscussionNote(pid interface{}, issue in
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/issues/%d/discussions/%s/notes/%d",
-		pathEscape(project),
+		PathEscape(project),
 		issue,
 		discussion,
 		note,
@@ -229,7 +229,7 @@ func (s *DiscussionsService) DeleteIssueDiscussionNote(pid interface{}, issue in
 		return nil, err
 	}
 	u := fmt.Sprintf("projects/%s/issues/%d/discussions/%s/notes/%d",
-		pathEscape(project),
+		PathEscape(project),
 		issue,
 		discussion,
 		note,
@@ -260,7 +260,7 @@ func (s *DiscussionsService) ListSnippetDiscussions(pid interface{}, snippet int
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/snippets/%d/discussions", pathEscape(project), snippet)
+	u := fmt.Sprintf("projects/%s/snippets/%d/discussions", PathEscape(project), snippet)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -286,7 +286,7 @@ func (s *DiscussionsService) GetSnippetDiscussion(pid interface{}, snippet int,
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/snippets/%d/discussions/%s",
-		pathEscape(project),
+		PathEscape(project),
 		snippet,
 		discussion,
 	)
@@ -325,7 +325,7 @@ func (s *DiscussionsService) CreateSnippetDiscussion(pid interface{}, snippet in
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/snippets/%d/discussions", pathEscape(project), snippet)
+	u := fmt.Sprintf("projects/%s/snippets/%d/discussions", PathEscape(project), snippet)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -362,7 +362,7 @@ func (s *DiscussionsService) AddSnippetDiscussionNote(pid interface{}, snippet i
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/snippets/%d/discussions/%s/notes",
-		pathEscape(project),
+		PathEscape(project),
 		snippet,
 		discussion,
 	)
@@ -401,7 +401,7 @@ func (s *DiscussionsService) UpdateSnippetDiscussionNote(pid interface{}, snippe
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/snippets/%d/discussions/%s/notes/%d",
-		pathEscape(project),
+		PathEscape(project),
 		snippet,
 		discussion,
 		note,
@@ -431,7 +431,7 @@ func (s *DiscussionsService) DeleteSnippetDiscussionNote(pid interface{}, snippe
 		return nil, err
 	}
 	u := fmt.Sprintf("projects/%s/snippets/%d/discussions/%s/notes/%d",
-		pathEscape(project),
+		PathEscape(project),
 		snippet,
 		discussion,
 		note,
@@ -463,7 +463,7 @@ func (s *DiscussionsService) ListGroupEpicDiscussions(gid interface{}, epic int,
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("groups/%s/epics/%d/discussions",
-		pathEscape(group),
+		PathEscape(group),
 		epic,
 	)
 
@@ -491,7 +491,7 @@ func (s *DiscussionsService) GetEpicDiscussion(gid interface{}, epic int, discus
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("groups/%s/epics/%d/discussions/%s",
-		pathEscape(group),
+		PathEscape(group),
 		epic,
 		discussion,
 	)
@@ -531,7 +531,7 @@ func (s *DiscussionsService) CreateEpicDiscussion(gid interface{}, epic int, opt
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("groups/%s/epics/%d/discussions",
-		pathEscape(group),
+		PathEscape(group),
 		epic,
 	)
 
@@ -569,7 +569,7 @@ func (s *DiscussionsService) AddEpicDiscussionNote(gid interface{}, epic int, di
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("groups/%s/epics/%d/discussions/%s/notes",
-		pathEscape(group),
+		PathEscape(group),
 		epic,
 		discussion,
 	)
@@ -608,7 +608,7 @@ func (s *DiscussionsService) UpdateEpicDiscussionNote(gid interface{}, epic int,
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("groups/%s/epics/%d/discussions/%s/notes/%d",
-		pathEscape(group),
+		PathEscape(group),
 		epic,
 		discussion,
 		note,
@@ -638,7 +638,7 @@ func (s *DiscussionsService) DeleteEpicDiscussionNote(gid interface{}, epic int,
 		return nil, err
 	}
 	u := fmt.Sprintf("groups/%s/epics/%d/discussions/%s/notes/%d",
-		pathEscape(group),
+		PathEscape(group),
 		epic,
 		discussion,
 		note,
@@ -670,7 +670,7 @@ func (s *DiscussionsService) ListMergeRequestDiscussions(pid interface{}, mergeR
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/merge_requests/%d/discussions",
-		pathEscape(project),
+		PathEscape(project),
 		mergeRequest,
 	)
 
@@ -699,7 +699,7 @@ func (s *DiscussionsService) GetMergeRequestDiscussion(pid interface{}, mergeReq
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/merge_requests/%d/discussions/%s",
-		pathEscape(project),
+		PathEscape(project),
 		mergeRequest,
 		discussion,
 	)
@@ -741,7 +741,7 @@ func (s *DiscussionsService) CreateMergeRequestDiscussion(pid interface{}, merge
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/merge_requests/%d/discussions",
-		pathEscape(project),
+		PathEscape(project),
 		mergeRequest,
 	)
 
@@ -779,7 +779,7 @@ func (s *DiscussionsService) ResolveMergeRequestDiscussion(pid interface{}, merg
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/merge_requests/%d/discussions/%s",
-		pathEscape(project),
+		PathEscape(project),
 		mergeRequest,
 		discussion,
 	)
@@ -819,7 +819,7 @@ func (s *DiscussionsService) AddMergeRequestDiscussionNote(pid interface{}, merg
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/merge_requests/%d/discussions/%s/notes",
-		pathEscape(project),
+		PathEscape(project),
 		mergeRequest,
 		discussion,
 	)
@@ -860,7 +860,7 @@ func (s *DiscussionsService) UpdateMergeRequestDiscussionNote(pid interface{}, m
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/merge_requests/%d/discussions/%s/notes/%d",
-		pathEscape(project),
+		PathEscape(project),
 		mergeRequest,
 		discussion,
 		note,
@@ -891,7 +891,7 @@ func (s *DiscussionsService) DeleteMergeRequestDiscussionNote(pid interface{}, m
 		return nil, err
 	}
 	u := fmt.Sprintf("projects/%s/merge_requests/%d/discussions/%s/notes/%d",
-		pathEscape(project),
+		PathEscape(project),
 		mergeRequest,
 		discussion,
 		note,
@@ -923,7 +923,7 @@ func (s *DiscussionsService) ListCommitDiscussions(pid interface{}, commit int,
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/repository/commits/%d/discussions",
-		pathEscape(project),
+		PathEscape(project),
 		commit,
 	)
 
@@ -952,7 +952,7 @@ func (s *DiscussionsService) GetCommitDiscussion(pid interface{}, commit int, di
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/repository/commits/%d/discussions/%s",
-		pathEscape(project),
+		PathEscape(project),
 		commit,
 		discussion,
 	)
@@ -992,7 +992,7 @@ func (s *DiscussionsService) CreateCommitDiscussion(pid interface{}, commit int,
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/repository/commits/%d/discussions",
-		pathEscape(project),
+		PathEscape(project),
 		commit,
 	)
 
@@ -1030,7 +1030,7 @@ func (s *DiscussionsService) AddCommitDiscussionNote(pid interface{}, commit int
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/repository/commits/%d/discussions/%s/notes",
-		pathEscape(project),
+		PathEscape(project),
 		commit,
 		discussion,
 	)
@@ -1069,7 +1069,7 @@ func (s *DiscussionsService) UpdateCommitDiscussionNote(pid interface{}, commit
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/repository/commits/%d/discussions/%s/notes/%d",
-		pathEscape(project),
+		PathEscape(project),
 		commit,
 		discussion,
 		note,
@@ -1099,7 +1099,7 @@ func (s *DiscussionsService) DeleteCommitDiscussionNote(pid interface{}, commit
 		return nil, err
 	}
 	u := fmt.Sprintf("projects/%s/repository/commits/%d/discussions/%s/notes/%d",
-		pathEscape(project),
+		PathEscape(project),
 		commit,
 		discussion,
 		note,
diff --git a/environments.go b/environments.go
index c5d66db..d881293 100644
--- a/environments.go
+++ b/environments.go
@@ -67,7 +67,7 @@ func (s *EnvironmentsService) ListEnvironments(pid interface{}, opts *ListEnviro
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/environments", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/environments", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opts, options)
 	if err != nil {
@@ -92,7 +92,7 @@ func (s *EnvironmentsService) GetEnvironment(pid interface{}, environment int, o
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/environments/%d", pathEscape(project), environment)
+	u := fmt.Sprintf("projects/%s/environments/%d", PathEscape(project), environment)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -129,7 +129,7 @@ func (s *EnvironmentsService) CreateEnvironment(pid interface{}, opt *CreateEnvi
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/environments", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/environments", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -163,7 +163,7 @@ func (s *EnvironmentsService) EditEnvironment(pid interface{}, environment int,
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/environments/%d", pathEscape(project), environment)
+	u := fmt.Sprintf("projects/%s/environments/%d", PathEscape(project), environment)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -188,7 +188,7 @@ func (s *EnvironmentsService) DeleteEnvironment(pid interface{}, environment int
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/environments/%d", pathEscape(project), environment)
+	u := fmt.Sprintf("projects/%s/environments/%d", PathEscape(project), environment)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -207,7 +207,7 @@ func (s *EnvironmentsService) StopEnvironment(pid interface{}, environmentID int
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/environments/%d/stop", pathEscape(project), environmentID)
+	u := fmt.Sprintf("projects/%s/environments/%d/stop", PathEscape(project), environmentID)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
diff --git a/epic_issues.go b/epic_issues.go
index a3489ad..9064c89 100644
--- a/epic_issues.go
+++ b/epic_issues.go
@@ -48,7 +48,7 @@ func (s *EpicIssuesService) ListEpicIssues(gid interface{}, epic int, opt *ListO
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics/%d/issues", pathEscape(group), epic)
+	u := fmt.Sprintf("groups/%s/epics/%d/issues", PathEscape(group), epic)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -73,7 +73,7 @@ func (s *EpicIssuesService) AssignEpicIssue(gid interface{}, epic, issue int, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics/%d/issues/%d", pathEscape(group), epic, issue)
+	u := fmt.Sprintf("groups/%s/epics/%d/issues/%d", PathEscape(group), epic, issue)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -98,7 +98,7 @@ func (s *EpicIssuesService) RemoveEpicIssue(gid interface{}, epic, epicIssue int
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics/%d/issues/%d", pathEscape(group), epic, epicIssue)
+	u := fmt.Sprintf("groups/%s/epics/%d/issues/%d", PathEscape(group), epic, epicIssue)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -135,7 +135,7 @@ func (s *EpicIssuesService) UpdateEpicIssueAssignment(gid interface{}, epic, epi
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics/%d/issues/%d", pathEscape(group), epic, epicIssue)
+	u := fmt.Sprintf("groups/%s/epics/%d/issues/%d", PathEscape(group), epic, epicIssue)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
diff --git a/epics.go b/epics.go
index 15002a1..eebc328 100644
--- a/epics.go
+++ b/epics.go
@@ -104,7 +104,7 @@ func (s *EpicsService) ListGroupEpics(gid interface{}, opt *ListGroupEpicsOption
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/epics", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -128,7 +128,7 @@ func (s *EpicsService) GetEpic(gid interface{}, epic int, options ...RequestOpti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics/%d", pathEscape(group), epic)
+	u := fmt.Sprintf("groups/%s/epics/%d", PathEscape(group), epic)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -152,7 +152,7 @@ func (s *EpicsService) GetEpicLinks(gid interface{}, epic int, options ...Reques
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics/%d/epics", pathEscape(group), epic)
+	u := fmt.Sprintf("groups/%s/epics/%d/epics", PathEscape(group), epic)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -189,7 +189,7 @@ func (s *EpicsService) CreateEpic(gid interface{}, opt *CreateEpicOptions, optio
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/epics", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -228,7 +228,7 @@ func (s *EpicsService) UpdateEpic(gid interface{}, epic int, opt *UpdateEpicOpti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics/%d", pathEscape(group), epic)
+	u := fmt.Sprintf("groups/%s/epics/%d", PathEscape(group), epic)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -252,7 +252,7 @@ func (s *EpicsService) DeleteEpic(gid interface{}, epic int, options ...RequestO
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics/%d", pathEscape(group), epic)
+	u := fmt.Sprintf("groups/%s/epics/%d", PathEscape(group), epic)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/events.go b/events.go
index 8fec14c..c7753f2 100644
--- a/events.go
+++ b/events.go
@@ -131,7 +131,7 @@ func (s *EventsService) ListProjectVisibleEvents(pid interface{}, opt *ListContr
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/events", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/events", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
diff --git a/external_status_checks.go b/external_status_checks.go
index b4b1451..b6d3092 100644
--- a/external_status_checks.go
+++ b/external_status_checks.go
@@ -48,7 +48,7 @@ func (s *ExternalStatusChecksService) ListMergeStatusChecks(pid interface{}, mr
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/status_checks", pathEscape(project), mr)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/status_checks", PathEscape(project), mr)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -73,7 +73,7 @@ func (s *ExternalStatusChecksService) ListProjectStatusChecks(pid interface{}, o
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/external_status_checks", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/external_status_checks", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
diff --git a/freeze_periods.go b/freeze_periods.go
index dfcca07..255666f 100644
--- a/freeze_periods.go
+++ b/freeze_periods.go
@@ -59,7 +59,7 @@ func (s *FreezePeriodsService) ListFreezePeriods(pid interface{}, opt *ListFreez
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/freeze_periods", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/freeze_periods", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -84,7 +84,7 @@ func (s *FreezePeriodsService) GetFreezePeriod(pid interface{}, freezePeriod int
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/freeze_periods/%d", pathEscape(project), freezePeriod)
+	u := fmt.Sprintf("projects/%s/freeze_periods/%d", PathEscape(project), freezePeriod)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -120,7 +120,7 @@ func (s *FreezePeriodsService) CreateFreezePeriodOptions(pid interface{}, opt *C
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/freeze_periods", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/freeze_periods", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -156,7 +156,7 @@ func (s *FreezePeriodsService) UpdateFreezePeriodOptions(pid interface{}, freeze
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/freeze_periods/%d", pathEscape(project), freezePeriod)
+	u := fmt.Sprintf("projects/%s/freeze_periods/%d", PathEscape(project), freezePeriod)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -183,7 +183,7 @@ func (s *FreezePeriodsService) DeleteFreezePeriod(pid interface{}, freezePeriod
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/freeze_periods/%d", pathEscape(project), freezePeriod)
+	u := fmt.Sprintf("projects/%s/freeze_periods/%d", PathEscape(project), freezePeriod)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/generic_packages.go b/generic_packages.go
index ba875fa..95f382a 100644
--- a/generic_packages.go
+++ b/generic_packages.go
@@ -70,10 +70,10 @@ func (s *GenericPackagesService) FormatPackageURL(pid interface{}, packageName,
 	}
 	u := fmt.Sprintf(
 		"projects/%s/packages/generic/%s/%s/%s",
-		pathEscape(project),
-		pathEscape(packageName),
-		pathEscape(packageVersion),
-		pathEscape(fileName),
+		PathEscape(project),
+		PathEscape(packageName),
+		PathEscape(packageVersion),
+		PathEscape(fileName),
 	)
 	return u, nil
 }
@@ -99,10 +99,10 @@ func (s *GenericPackagesService) PublishPackageFile(pid interface{}, packageName
 	}
 	u := fmt.Sprintf(
 		"projects/%s/packages/generic/%s/%s/%s",
-		pathEscape(project),
-		pathEscape(packageName),
-		pathEscape(packageVersion),
-		pathEscape(fileName),
+		PathEscape(project),
+		PathEscape(packageName),
+		PathEscape(packageVersion),
+		PathEscape(fileName),
 	)
 
 	// We need to create the request as a GET request to make sure the options
@@ -137,10 +137,10 @@ func (s *GenericPackagesService) DownloadPackageFile(pid interface{}, packageNam
 	}
 	u := fmt.Sprintf(
 		"projects/%s/packages/generic/%s/%s/%s",
-		pathEscape(project),
-		pathEscape(packageName),
-		pathEscape(packageVersion),
-		pathEscape(fileName),
+		PathEscape(project),
+		PathEscape(packageName),
+		PathEscape(packageVersion),
+		PathEscape(fileName),
 	)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
diff --git a/gitlab.go b/gitlab.go
index d36c467..f8b59b1 100644
--- a/gitlab.go
+++ b/gitlab.go
@@ -759,7 +759,7 @@ func parseID(id interface{}) (string, error) {
 }
 
 // Helper function to escape a project identifier.
-func pathEscape(s string) string {
+func PathEscape(s string) string {
 	return strings.ReplaceAll(url.PathEscape(s), ".", "%2E")
 }
 
diff --git a/group_badges.go b/group_badges.go
index 9649991..7207fe7 100644
--- a/group_badges.go
+++ b/group_badges.go
@@ -66,7 +66,7 @@ func (s *GroupBadgesService) ListGroupBadges(gid interface{}, opt *ListGroupBadg
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/badges", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/badges", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -91,7 +91,7 @@ func (s *GroupBadgesService) GetGroupBadge(gid interface{}, badge int, options .
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/badges/%d", pathEscape(group), badge)
+	u := fmt.Sprintf("groups/%s/badges/%d", PathEscape(group), badge)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -125,7 +125,7 @@ func (s *GroupBadgesService) AddGroupBadge(gid interface{}, opt *AddGroupBadgeOp
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/badges", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/badges", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -159,7 +159,7 @@ func (s *GroupBadgesService) EditGroupBadge(gid interface{}, badge int, opt *Edi
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/badges/%d", pathEscape(group), badge)
+	u := fmt.Sprintf("groups/%s/badges/%d", PathEscape(group), badge)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -184,7 +184,7 @@ func (s *GroupBadgesService) DeleteGroupBadge(gid interface{}, badge int, option
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/badges/%d", pathEscape(group), badge)
+	u := fmt.Sprintf("groups/%s/badges/%d", PathEscape(group), badge)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -213,7 +213,7 @@ func (s *GroupBadgesService) PreviewGroupBadge(gid interface{}, opt *GroupBadgeP
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/badges/render", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/badges/render", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
diff --git a/group_boards.go b/group_boards.go
index 906db10..ce77b9a 100644
--- a/group_boards.go
+++ b/group_boards.go
@@ -62,7 +62,7 @@ func (s *GroupIssueBoardsService) ListGroupIssueBoards(gid interface{}, opt *Lis
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/boards", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/boards", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -96,7 +96,7 @@ func (s *GroupIssueBoardsService) CreateGroupIssueBoard(gid interface{}, opt *Cr
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/boards", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/boards", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -121,7 +121,7 @@ func (s *GroupIssueBoardsService) GetGroupIssueBoard(gid interface{}, board int,
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/boards/%d", pathEscape(group), board)
+	u := fmt.Sprintf("groups/%s/boards/%d", PathEscape(group), board)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -158,7 +158,7 @@ func (s *GroupIssueBoardsService) UpdateIssueBoard(gid interface{}, board int, o
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/boards/%d", pathEscape(group), board)
+	u := fmt.Sprintf("groups/%s/boards/%d", PathEscape(group), board)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -183,7 +183,7 @@ func (s *GroupIssueBoardsService) DeleteIssueBoard(gid interface{}, board int, o
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/boards/%d", pathEscape(group), board)
+	u := fmt.Sprintf("groups/%s/boards/%d", PathEscape(group), board)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -209,7 +209,7 @@ func (s *GroupIssueBoardsService) ListGroupIssueBoardLists(gid interface{}, boar
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/boards/%d/lists", pathEscape(group), board)
+	u := fmt.Sprintf("groups/%s/boards/%d/lists", PathEscape(group), board)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -235,7 +235,7 @@ func (s *GroupIssueBoardsService) GetGroupIssueBoardList(gid interface{}, board,
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("groups/%s/boards/%d/lists/%d",
-		pathEscape(group),
+		PathEscape(group),
 		board,
 		list,
 	)
@@ -272,7 +272,7 @@ func (s *GroupIssueBoardsService) CreateGroupIssueBoardList(gid interface{}, boa
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/boards/%d/lists", pathEscape(group), board)
+	u := fmt.Sprintf("groups/%s/boards/%d/lists", PathEscape(group), board)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -308,7 +308,7 @@ func (s *GroupIssueBoardsService) UpdateIssueBoardList(gid interface{}, board, l
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("groups/%s/boards/%d/lists/%d",
-		pathEscape(group),
+		PathEscape(group),
 		board,
 		list,
 	)
@@ -338,7 +338,7 @@ func (s *GroupIssueBoardsService) DeleteGroupIssueBoardList(gid interface{}, boa
 		return nil, err
 	}
 	u := fmt.Sprintf("groups/%s/boards/%d/lists/%d",
-		pathEscape(group),
+		PathEscape(group),
 		board,
 		list,
 	)
diff --git a/group_clusters.go b/group_clusters.go
index c3f15c2..f2b9e2a 100644
--- a/group_clusters.go
+++ b/group_clusters.go
@@ -64,7 +64,7 @@ func (s *GroupClustersService) ListClusters(pid interface{}, options ...RequestO
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/clusters", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/clusters", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -89,7 +89,7 @@ func (s *GroupClustersService) GetCluster(pid interface{}, cluster int, options
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/clusters/%d", pathEscape(group), cluster)
+	u := fmt.Sprintf("groups/%s/clusters/%d", PathEscape(group), cluster)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -137,7 +137,7 @@ func (s *GroupClustersService) AddCluster(pid interface{}, opt *AddGroupClusterO
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/clusters/user", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/clusters/user", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -181,7 +181,7 @@ func (s *GroupClustersService) EditCluster(pid interface{}, cluster int, opt *Ed
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/clusters/%d", pathEscape(group), cluster)
+	u := fmt.Sprintf("groups/%s/clusters/%d", PathEscape(group), cluster)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -206,7 +206,7 @@ func (s *GroupClustersService) DeleteCluster(pid interface{}, cluster int, optio
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/clusters/%d", pathEscape(group), cluster)
+	u := fmt.Sprintf("groups/%s/clusters/%d", PathEscape(group), cluster)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/group_hooks.go b/group_hooks.go
index 2f03c71..9339370 100644
--- a/group_hooks.go
+++ b/group_hooks.go
@@ -53,7 +53,7 @@ func (s *GroupsService) ListGroupHooks(gid interface{}) ([]*GroupHook, *Response
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/hooks", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/hooks", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, nil)
 	if err != nil {
@@ -77,7 +77,7 @@ func (s *GroupsService) GetGroupHook(pid interface{}, hook int, options ...Reque
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/hooks/%d", pathEscape(group), hook)
+	u := fmt.Sprintf("groups/%s/hooks/%d", PathEscape(group), hook)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -122,7 +122,7 @@ func (s *GroupsService) AddGroupHook(gid interface{}, opt *AddGroupHookOptions,
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/hooks", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/hooks", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -169,7 +169,7 @@ func (s *GroupsService) EditGroupHook(pid interface{}, hook int, opt *EditGroupH
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/hooks/%d", pathEscape(group), hook)
+	u := fmt.Sprintf("groups/%s/hooks/%d", PathEscape(group), hook)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -195,7 +195,7 @@ func (s *GroupsService) DeleteGroupHook(pid interface{}, hook int, options ...Re
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/hooks/%d", pathEscape(group), hook)
+	u := fmt.Sprintf("groups/%s/hooks/%d", PathEscape(group), hook)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/group_import_export.go b/group_import_export.go
index c578805..e19d202 100644
--- a/group_import_export.go
+++ b/group_import_export.go
@@ -44,7 +44,7 @@ func (s *GroupImportExportService) ScheduleExport(gid interface{}, options ...Re
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/export", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/export", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -63,7 +63,7 @@ func (s *GroupImportExportService) ExportDownload(gid interface{}, options ...Re
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/export/download", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/export/download", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
diff --git a/group_labels.go b/group_labels.go
index e40b597..e46af3c 100644
--- a/group_labels.go
+++ b/group_labels.go
@@ -52,7 +52,7 @@ func (s *GroupLabelsService) ListGroupLabels(gid interface{}, opt *ListGroupLabe
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/labels", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/labels", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -81,7 +81,7 @@ func (s *GroupLabelsService) GetGroupLabel(gid interface{}, labelID interface{},
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/labels/%s", pathEscape(group), label)
+	u := fmt.Sprintf("groups/%s/labels/%s", PathEscape(group), label)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -113,7 +113,7 @@ func (s *GroupLabelsService) CreateGroupLabel(gid interface{}, opt *CreateGroupL
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/labels", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/labels", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -143,7 +143,7 @@ func (s *GroupLabelsService) DeleteGroupLabel(gid interface{}, opt *DeleteGroupL
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/labels", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/labels", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, opt, options)
 	if err != nil {
@@ -169,7 +169,7 @@ func (s *GroupLabelsService) UpdateGroupLabel(gid interface{}, opt *UpdateGroupL
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/labels", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/labels", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -200,7 +200,7 @@ func (s *GroupLabelsService) SubscribeToGroupLabel(gid interface{}, labelID inte
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/labels/%s/subscribe", pathEscape(group), label)
+	u := fmt.Sprintf("groups/%s/labels/%s/subscribe", PathEscape(group), label)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -231,7 +231,7 @@ func (s *GroupLabelsService) UnsubscribeFromGroupLabel(gid interface{}, labelID
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/labels/%s/unsubscribe", pathEscape(group), label)
+	u := fmt.Sprintf("groups/%s/labels/%s/unsubscribe", PathEscape(group), label)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
diff --git a/group_members.go b/group_members.go
index 3ec95de..4eeee59 100644
--- a/group_members.go
+++ b/group_members.go
@@ -77,7 +77,7 @@ func (s *GroupsService) ListGroupMembers(gid interface{}, opt *ListGroupMembersO
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/members", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/members", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -103,7 +103,7 @@ func (s *GroupsService) ListAllGroupMembers(gid interface{}, opt *ListGroupMembe
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/members/all", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/members/all", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -138,7 +138,7 @@ func (s *GroupMembersService) GetGroupMember(gid interface{}, user int, options
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/members/%d", pathEscape(group), user)
+	u := fmt.Sprintf("groups/%s/members/%d", PathEscape(group), user)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -188,7 +188,7 @@ func (s *GroupsService) ListBillableGroupMembers(gid interface{}, opt *ListBilla
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/billable_members", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/billable_members", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -213,7 +213,7 @@ func (s *GroupsService) RemoveBillableGroupMember(gid interface{}, user int, opt
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/billable_members/%d", pathEscape(group), user)
+	u := fmt.Sprintf("groups/%s/billable_members/%d", PathEscape(group), user)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -232,7 +232,7 @@ func (s *GroupMembersService) AddGroupMember(gid interface{}, opt *AddGroupMembe
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/members", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/members", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -257,7 +257,7 @@ func (s *GroupMembersService) ShareWithGroup(gid interface{}, opt *ShareWithGrou
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/share", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/share", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -282,7 +282,7 @@ func (s *GroupMembersService) DeleteShareWithGroup(gid interface{}, groupID int,
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/share/%d", pathEscape(group), groupID)
+	u := fmt.Sprintf("groups/%s/share/%d", PathEscape(group), groupID)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -311,7 +311,7 @@ func (s *GroupMembersService) EditGroupMember(gid interface{}, user int, opt *Ed
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/members/%d", pathEscape(group), user)
+	u := fmt.Sprintf("groups/%s/members/%d", PathEscape(group), user)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -336,7 +336,7 @@ func (s *GroupMembersService) RemoveGroupMember(gid interface{}, user int, optio
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/members/%d", pathEscape(group), user)
+	u := fmt.Sprintf("groups/%s/members/%d", PathEscape(group), user)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/group_milestones.go b/group_milestones.go
index 69cd997..f2dc0c1 100644
--- a/group_milestones.go
+++ b/group_milestones.go
@@ -74,7 +74,7 @@ func (s *GroupMilestonesService) ListGroupMilestones(gid interface{}, opt *ListG
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/milestones", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/milestones", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -99,7 +99,7 @@ func (s *GroupMilestonesService) GetGroupMilestone(gid interface{}, milestone in
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/milestones/%d", pathEscape(group), milestone)
+	u := fmt.Sprintf("groups/%s/milestones/%d", PathEscape(group), milestone)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -135,7 +135,7 @@ func (s *GroupMilestonesService) CreateGroupMilestone(gid interface{}, opt *Crea
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/milestones", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/milestones", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -172,7 +172,7 @@ func (s *GroupMilestonesService) UpdateGroupMilestone(gid interface{}, milestone
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/milestones/%d", pathEscape(group), milestone)
+	u := fmt.Sprintf("groups/%s/milestones/%d", PathEscape(group), milestone)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -203,7 +203,7 @@ func (s *GroupMilestonesService) GetGroupMilestoneIssues(gid interface{}, milest
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/milestones/%d/issues", pathEscape(group), milestone)
+	u := fmt.Sprintf("groups/%s/milestones/%d/issues", PathEscape(group), milestone)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -236,7 +236,7 @@ func (s *GroupMilestonesService) GetGroupMilestoneMergeRequests(gid interface{},
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/milestones/%d/merge_requests", pathEscape(group), milestone)
+	u := fmt.Sprintf("groups/%s/milestones/%d/merge_requests", PathEscape(group), milestone)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -279,7 +279,7 @@ func (s *GroupMilestonesService) GetGroupMilestoneBurndownChartEvents(gid interf
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/milestones/%d/burndown_events", pathEscape(group), milestone)
+	u := fmt.Sprintf("groups/%s/milestones/%d/burndown_events", PathEscape(group), milestone)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
diff --git a/group_variables.go b/group_variables.go
index 4cf9714..e02176a 100644
--- a/group_variables.go
+++ b/group_variables.go
@@ -64,7 +64,7 @@ func (s *GroupVariablesService) ListVariables(gid interface{}, opt *ListGroupVar
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/variables", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/variables", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -89,7 +89,7 @@ func (s *GroupVariablesService) GetVariable(gid interface{}, key string, options
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/variables/%s", pathEscape(group), url.PathEscape(key))
+	u := fmt.Sprintf("groups/%s/variables/%s", PathEscape(group), url.PathEscape(key))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -128,7 +128,7 @@ func (s *GroupVariablesService) CreateVariable(gid interface{}, opt *CreateGroup
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/variables", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/variables", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -167,7 +167,7 @@ func (s *GroupVariablesService) UpdateVariable(gid interface{}, key string, opt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/variables/%s", pathEscape(group), url.PathEscape(key))
+	u := fmt.Sprintf("groups/%s/variables/%s", PathEscape(group), url.PathEscape(key))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -192,7 +192,7 @@ func (s *GroupVariablesService) RemoveVariable(gid interface{}, key string, opti
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/variables/%s", pathEscape(group), url.PathEscape(key))
+	u := fmt.Sprintf("groups/%s/variables/%s", PathEscape(group), url.PathEscape(key))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/group_wikis.go b/group_wikis.go
index 74c9898..55e51da 100644
--- a/group_wikis.go
+++ b/group_wikis.go
@@ -61,7 +61,7 @@ func (s *GroupWikisService) ListGroupWikis(gid interface{}, opt *ListGroupWikisO
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/wikis", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/wikis", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -86,7 +86,7 @@ func (s *GroupWikisService) GetGroupWikiPage(gid interface{}, slug string, optio
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/wikis/%s", pathEscape(group), url.PathEscape(slug))
+	u := fmt.Sprintf("groups/%s/wikis/%s", PathEscape(group), url.PathEscape(slug))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -122,7 +122,7 @@ func (s *GroupWikisService) CreateGroupWikiPage(gid interface{}, opt *CreateGrou
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/wikis", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/wikis", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -158,7 +158,7 @@ func (s *GroupWikisService) EditGroupWikiPage(gid interface{}, slug string, opt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/wikis/%s", pathEscape(group), url.PathEscape(slug))
+	u := fmt.Sprintf("groups/%s/wikis/%s", PathEscape(group), url.PathEscape(slug))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -183,7 +183,7 @@ func (s *GroupWikisService) DeleteGroupWikiPage(gid interface{}, slug string, op
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/wikis/%s", pathEscape(group), url.PathEscape(slug))
+	u := fmt.Sprintf("groups/%s/wikis/%s", PathEscape(group), url.PathEscape(slug))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/groups.go b/groups.go
index fae5467..b290995 100644
--- a/groups.go
+++ b/groups.go
@@ -140,7 +140,7 @@ func (s *GroupsService) GetGroup(gid interface{}, opt *GetGroupOptions, options
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s", pathEscape(group))
+	u := fmt.Sprintf("groups/%s", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -214,7 +214,7 @@ func (s *GroupsService) TransferGroup(gid interface{}, pid interface{}, options
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/projects/%s", pathEscape(group), pathEscape(project))
+	u := fmt.Sprintf("groups/%s/projects/%s", PathEscape(group), PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -267,7 +267,7 @@ func (s *GroupsService) UpdateGroup(gid interface{}, opt *UpdateGroupOptions, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s", pathEscape(group))
+	u := fmt.Sprintf("groups/%s", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -291,7 +291,7 @@ func (s *GroupsService) DeleteGroup(gid interface{}, options ...RequestOptionFun
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s", pathEscape(group))
+	u := fmt.Sprintf("groups/%s", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -310,7 +310,7 @@ func (s *GroupsService) RestoreGroup(gid interface{}, options ...RequestOptionFu
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/restore", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/restore", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -381,7 +381,7 @@ func (s *GroupsService) ListGroupProjects(gid interface{}, opt *ListGroupProject
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/projects", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/projects", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -412,7 +412,7 @@ func (s *GroupsService) ListSubgroups(gid interface{}, opt *ListSubgroupsOptions
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/subgroups", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/subgroups", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -444,7 +444,7 @@ func (s *GroupsService) ListDescendantGroups(gid interface{}, opt *ListDescendan
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/descendant_groups", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/descendant_groups", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -470,7 +470,7 @@ func (s *GroupsService) ListGroupLDAPLinks(gid interface{}, options ...RequestOp
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/ldap_group_links", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/ldap_group_links", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -517,7 +517,7 @@ func (s *GroupsService) AddGroupLDAPLink(gid interface{}, opt *AddGroupLDAPLinkO
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/ldap_group_links", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/ldap_group_links", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -543,7 +543,7 @@ func (s *GroupsService) DeleteGroupLDAPLink(gid interface{}, cn string, options
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/ldap_group_links/%s", pathEscape(group), pathEscape(cn))
+	u := fmt.Sprintf("groups/%s/ldap_group_links/%s", PathEscape(group), PathEscape(cn))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -563,7 +563,7 @@ func (s *GroupsService) DeleteGroupLDAPLinkWithCNOrFilter(gid interface{}, opts
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/ldap_group_links", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/ldap_group_links", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, opts, options)
 	if err != nil {
@@ -585,9 +585,9 @@ func (s *GroupsService) DeleteGroupLDAPLinkForProvider(gid interface{}, provider
 	}
 	u := fmt.Sprintf(
 		"groups/%s/ldap_group_links/%s/%s",
-		pathEscape(group),
-		pathEscape(provider),
-		pathEscape(cn),
+		PathEscape(group),
+		PathEscape(provider),
+		PathEscape(cn),
 	)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
@@ -617,7 +617,7 @@ func (s *GroupsService) ShareGroupWithGroup(gid interface{}, opt *ShareGroupWith
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/share", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/share", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -642,7 +642,7 @@ func (s *GroupsService) UnshareGroupFromGroup(gid interface{}, groupID int, opti
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/share/%d", pathEscape(group), groupID)
+	u := fmt.Sprintf("groups/%s/share/%d", PathEscape(group), groupID)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -681,7 +681,7 @@ func (s *GroupsService) GetGroupPushRules(gid interface{}, options ...RequestOpt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/push_rule", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/push_rule", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -725,7 +725,7 @@ func (s *GroupsService) AddGroupPushRule(gid interface{}, opt *AddGroupPushRuleO
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/push_rule", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/push_rule", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -769,7 +769,7 @@ func (s *GroupsService) EditGroupPushRule(gid interface{}, opt *EditGroupPushRul
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/push_rule", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/push_rule", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -794,7 +794,7 @@ func (s *GroupsService) DeleteGroupPushRule(gid interface{}, options ...RequestO
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/push_rule", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/push_rule", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/invites.go b/invites.go
index fffbfa3..b5ae81c 100644
--- a/invites.go
+++ b/invites.go
@@ -62,7 +62,7 @@ func (s *InvitesService) ListPendingGroupInvitations(gid interface{}, opt *ListP
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/invitations", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/invitations", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -87,7 +87,7 @@ func (s *InvitesService) ListPendingProjectInvitations(pid interface{}, opt *Lis
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/invitations", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/invitations", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -133,7 +133,7 @@ func (s *InvitesService) GroupInvites(gid interface{}, opt *InvitesOptions, opti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/invitations", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/invitations", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -158,7 +158,7 @@ func (s *InvitesService) ProjectInvites(pid interface{}, opt *InvitesOptions, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/invitations", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/invitations", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
diff --git a/issue_links.go b/issue_links.go
index 4d8f891..f40b65c 100644
--- a/issue_links.go
+++ b/issue_links.go
@@ -50,7 +50,7 @@ func (s *IssueLinksService) ListIssueRelations(pid interface{}, issueIID int, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/links", pathEscape(project), issueIID)
+	u := fmt.Sprintf("projects/%s/issues/%d/links", PathEscape(project), issueIID)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -85,7 +85,7 @@ func (s *IssueLinksService) CreateIssueLink(pid interface{}, issueIID int, opt *
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/links", pathEscape(project), issueIID)
+	u := fmt.Sprintf("projects/%s/issues/%d/links", PathEscape(project), issueIID)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -111,7 +111,7 @@ func (s *IssueLinksService) DeleteIssueLink(pid interface{}, issueIID, issueLink
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/issues/%d/links/%d",
-		pathEscape(project),
+		PathEscape(project),
 		issueIID,
 		issueLinkID)
 
diff --git a/issues.go b/issues.go
index 60f09f9..41d9c0b 100644
--- a/issues.go
+++ b/issues.go
@@ -293,7 +293,7 @@ func (s *IssuesService) ListGroupIssues(pid interface{}, opt *ListGroupIssuesOpt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/issues", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/issues", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -351,7 +351,7 @@ func (s *IssuesService) ListProjectIssues(pid interface{}, opt *ListProjectIssue
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/issues", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -375,7 +375,7 @@ func (s *IssuesService) GetIssue(pid interface{}, issue int, options ...RequestO
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d", pathEscape(project), issue)
+	u := fmt.Sprintf("projects/%s/issues/%d", PathEscape(project), issue)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -418,7 +418,7 @@ func (s *IssuesService) CreateIssue(pid interface{}, opt *CreateIssueOptions, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/issues", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -463,7 +463,7 @@ func (s *IssuesService) UpdateIssue(pid interface{}, issue int, opt *UpdateIssue
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d", pathEscape(project), issue)
+	u := fmt.Sprintf("projects/%s/issues/%d", PathEscape(project), issue)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -487,7 +487,7 @@ func (s *IssuesService) DeleteIssue(pid interface{}, issue int, options ...Reque
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d", pathEscape(project), issue)
+	u := fmt.Sprintf("projects/%s/issues/%d", PathEscape(project), issue)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -513,7 +513,7 @@ func (s *IssuesService) MoveIssue(pid interface{}, issue int, opt *MoveIssueOpti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/move", pathEscape(project), issue)
+	u := fmt.Sprintf("projects/%s/issues/%d/move", PathEscape(project), issue)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -540,7 +540,7 @@ func (s *IssuesService) SubscribeToIssue(pid interface{}, issue int, options ...
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/subscribe", pathEscape(project), issue)
+	u := fmt.Sprintf("projects/%s/issues/%d/subscribe", PathEscape(project), issue)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -567,7 +567,7 @@ func (s *IssuesService) UnsubscribeFromIssue(pid interface{}, issue int, options
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/unsubscribe", pathEscape(project), issue)
+	u := fmt.Sprintf("projects/%s/issues/%d/unsubscribe", PathEscape(project), issue)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -594,7 +594,7 @@ func (s *IssuesService) CreateTodo(pid interface{}, issue int, options ...Reques
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/todo", pathEscape(project), issue)
+	u := fmt.Sprintf("projects/%s/issues/%d/todo", PathEscape(project), issue)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -627,7 +627,7 @@ func (s *IssuesService) ListMergeRequestsClosingIssue(pid interface{}, issue int
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("/projects/%s/issues/%d/closed_by", pathEscape(project), issue)
+	u := fmt.Sprintf("/projects/%s/issues/%d/closed_by", PathEscape(project), issue)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -661,7 +661,7 @@ func (s *IssuesService) ListMergeRequestsRelatedToIssue(pid interface{}, issue i
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("/projects/%s/issues/%d/related_merge_requests",
-		pathEscape(project),
+		PathEscape(project),
 		issue,
 	)
 
@@ -728,7 +728,7 @@ func (s *IssuesService) GetParticipants(pid interface{}, issue int, options ...R
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/participants", pathEscape(project), issue)
+	u := fmt.Sprintf("projects/%s/issues/%d/participants", PathEscape(project), issue)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
diff --git a/issues_statistics.go b/issues_statistics.go
index 6f48a17..701182b 100644
--- a/issues_statistics.go
+++ b/issues_statistics.go
@@ -122,7 +122,7 @@ func (s *IssuesStatisticsService) GetGroupIssuesStatistics(gid interface{}, opt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/issues_statistics", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/issues_statistics", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -170,7 +170,7 @@ func (s *IssuesStatisticsService) GetProjectIssuesStatistics(pid interface{}, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues_statistics", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/issues_statistics", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
diff --git a/jobs.go b/jobs.go
index 17baefd..c4bffe8 100644
--- a/jobs.go
+++ b/jobs.go
@@ -121,7 +121,7 @@ func (s *JobsService) ListProjectJobs(pid interface{}, opts *ListJobsOptions, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/jobs", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/jobs", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opts, options)
 	if err != nil {
@@ -147,7 +147,7 @@ func (s *JobsService) ListPipelineJobs(pid interface{}, pipelineID int, opts *Li
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipelines/%d/jobs", pathEscape(project), pipelineID)
+	u := fmt.Sprintf("projects/%s/pipelines/%d/jobs", PathEscape(project), pipelineID)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opts, options)
 	if err != nil {
@@ -173,7 +173,7 @@ func (s *JobsService) ListPipelineBridges(pid interface{}, pipelineID int, opts
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipelines/%d/bridges", pathEscape(project), pipelineID)
+	u := fmt.Sprintf("projects/%s/pipelines/%d/bridges", PathEscape(project), pipelineID)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opts, options)
 	if err != nil {
@@ -223,7 +223,7 @@ func (s *JobsService) GetJob(pid interface{}, jobID int, options ...RequestOptio
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/jobs/%d", pathEscape(project), jobID)
+	u := fmt.Sprintf("projects/%s/jobs/%d", PathEscape(project), jobID)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -248,7 +248,7 @@ func (s *JobsService) GetJobArtifacts(pid interface{}, jobID int, options ...Req
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/jobs/%d/artifacts", pathEscape(project), jobID)
+	u := fmt.Sprintf("projects/%s/jobs/%d/artifacts", PathEscape(project), jobID)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -283,7 +283,7 @@ func (s *JobsService) DownloadArtifactsFile(pid interface{}, refName string, opt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/jobs/artifacts/%s/download", pathEscape(project), refName)
+	u := fmt.Sprintf("projects/%s/jobs/artifacts/%s/download", PathEscape(project), refName)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -314,7 +314,7 @@ func (s *JobsService) DownloadSingleArtifactsFile(pid interface{}, jobID int, ar
 
 	u := fmt.Sprintf(
 		"projects/%s/jobs/%d/artifacts/%s",
-		pathEscape(project),
+		PathEscape(project),
 		jobID,
 		artifactPath,
 	)
@@ -342,7 +342,7 @@ func (s *JobsService) GetTraceFile(pid interface{}, jobID int, options ...Reques
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/jobs/%d/trace", pathEscape(project), jobID)
+	u := fmt.Sprintf("projects/%s/jobs/%d/trace", PathEscape(project), jobID)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -367,7 +367,7 @@ func (s *JobsService) CancelJob(pid interface{}, jobID int, options ...RequestOp
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/jobs/%d/cancel", pathEscape(project), jobID)
+	u := fmt.Sprintf("projects/%s/jobs/%d/cancel", PathEscape(project), jobID)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -392,7 +392,7 @@ func (s *JobsService) RetryJob(pid interface{}, jobID int, options ...RequestOpt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/jobs/%d/retry", pathEscape(project), jobID)
+	u := fmt.Sprintf("projects/%s/jobs/%d/retry", PathEscape(project), jobID)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -418,7 +418,7 @@ func (s *JobsService) EraseJob(pid interface{}, jobID int, options ...RequestOpt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/jobs/%d/erase", pathEscape(project), jobID)
+	u := fmt.Sprintf("projects/%s/jobs/%d/erase", PathEscape(project), jobID)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -444,7 +444,7 @@ func (s *JobsService) KeepArtifacts(pid interface{}, jobID int, options ...Reque
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/jobs/%d/artifacts/keep", pathEscape(project), jobID)
+	u := fmt.Sprintf("projects/%s/jobs/%d/artifacts/keep", PathEscape(project), jobID)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -469,7 +469,7 @@ func (s *JobsService) PlayJob(pid interface{}, jobID int, options ...RequestOpti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/jobs/%d/play", pathEscape(project), jobID)
+	u := fmt.Sprintf("projects/%s/jobs/%d/play", PathEscape(project), jobID)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -494,7 +494,7 @@ func (s *JobsService) DeleteArtifacts(pid interface{}, jobID int, options ...Req
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/jobs/%d/artifacts", pathEscape(project), jobID)
+	u := fmt.Sprintf("projects/%s/jobs/%d/artifacts", PathEscape(project), jobID)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/labels.go b/labels.go
index ccf6b24..b00ea1a 100644
--- a/labels.go
+++ b/labels.go
@@ -89,7 +89,7 @@ func (s *LabelsService) ListLabels(pid interface{}, opt *ListLabelsOptions, opti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/labels", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/labels", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -117,7 +117,7 @@ func (s *LabelsService) GetLabel(pid interface{}, labelID interface{}, options .
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/labels/%s", pathEscape(project), label)
+	u := fmt.Sprintf("projects/%s/labels/%s", PathEscape(project), label)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -151,7 +151,7 @@ func (s *LabelsService) CreateLabel(pid interface{}, opt *CreateLabelOptions, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/labels", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/labels", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -182,7 +182,7 @@ func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions, op
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/labels", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/labels", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, opt, options)
 	if err != nil {
@@ -211,7 +211,7 @@ func (s *LabelsService) UpdateLabel(pid interface{}, opt *UpdateLabelOptions, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/labels", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/labels", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -242,7 +242,7 @@ func (s *LabelsService) SubscribeToLabel(pid interface{}, labelID interface{}, o
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/labels/%s/subscribe", pathEscape(project), label)
+	u := fmt.Sprintf("projects/%s/labels/%s/subscribe", PathEscape(project), label)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -273,7 +273,7 @@ func (s *LabelsService) UnsubscribeFromLabel(pid interface{}, labelID interface{
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/labels/%s/unsubscribe", pathEscape(project), label)
+	u := fmt.Sprintf("projects/%s/labels/%s/unsubscribe", PathEscape(project), label)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -296,7 +296,7 @@ func (s *LabelsService) PromoteLabel(pid interface{}, labelID interface{}, optio
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/labels/%s/promote", pathEscape(project), label)
+	u := fmt.Sprintf("projects/%s/labels/%s/promote", PathEscape(project), label)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, nil, options)
 	if err != nil {
diff --git a/merge_request_approvals.go b/merge_request_approvals.go
index 2c39e17..df80a71 100644
--- a/merge_request_approvals.go
+++ b/merge_request_approvals.go
@@ -144,7 +144,7 @@ func (s *MergeRequestApprovalsService) ApproveMergeRequest(pid interface{}, mr i
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/approve", pathEscape(project), mr)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/approve", PathEscape(project), mr)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -169,7 +169,7 @@ func (s *MergeRequestApprovalsService) UnapproveMergeRequest(pid interface{}, mr
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/unapprove", pathEscape(project), mr)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/unapprove", PathEscape(project), mr)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -197,7 +197,7 @@ func (s *MergeRequestApprovalsService) GetConfiguration(pid interface{}, mr int,
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/approvals", pathEscape(project), mr)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/approvals", PathEscape(project), mr)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -222,7 +222,7 @@ func (s *MergeRequestApprovalsService) ChangeApprovalConfiguration(pid interface
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/approvals", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/approvals", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -257,7 +257,7 @@ func (s *MergeRequestApprovalsService) ChangeAllowedApprovers(pid interface{}, m
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/approvers", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/approvers", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -282,7 +282,7 @@ func (s *MergeRequestApprovalsService) GetApprovalRules(pid interface{}, mergeRe
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/approval_rules", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/approval_rules", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -307,7 +307,7 @@ func (s *MergeRequestApprovalsService) GetApprovalState(pid interface{}, mergeRe
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/approval_state", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/approval_state", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -345,7 +345,7 @@ func (s *MergeRequestApprovalsService) CreateApprovalRule(pid interface{}, merge
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/approval_rules", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/approval_rules", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -382,7 +382,7 @@ func (s *MergeRequestApprovalsService) UpdateApprovalRule(pid interface{}, merge
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/approval_rules/%d", pathEscape(project), mergeRequest, approvalRule)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/approval_rules/%d", PathEscape(project), mergeRequest, approvalRule)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -407,7 +407,7 @@ func (s *MergeRequestApprovalsService) DeleteApprovalRule(pid interface{}, merge
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/approval_rules/%d", pathEscape(project), mergeRequest, approvalRule)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/approval_rules/%d", PathEscape(project), mergeRequest, approvalRule)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/merge_requests.go b/merge_requests.go
index 1cfb3c7..bdd0fd8 100644
--- a/merge_requests.go
+++ b/merge_requests.go
@@ -234,7 +234,7 @@ func (s *MergeRequestsService) ListGroupMergeRequests(gid interface{}, opt *List
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/merge_requests", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/merge_requests", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -294,7 +294,7 @@ func (s *MergeRequestsService) ListProjectMergeRequests(pid interface{}, opt *Li
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/merge_requests", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -330,7 +330,7 @@ func (s *MergeRequestsService) GetMergeRequest(pid interface{}, mergeRequest int
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -355,7 +355,7 @@ func (s *MergeRequestsService) GetMergeRequestApprovals(pid interface{}, mergeRe
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/approvals", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/approvals", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -387,7 +387,7 @@ func (s *MergeRequestsService) GetMergeRequestCommits(pid interface{}, mergeRequ
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/commits", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/commits", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -422,7 +422,7 @@ func (s *MergeRequestsService) GetMergeRequestChanges(pid interface{}, mergeRequ
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/changes", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/changes", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -447,7 +447,7 @@ func (s *MergeRequestsService) GetMergeRequestParticipants(pid interface{}, merg
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/participants", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/participants", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -472,7 +472,7 @@ func (s *MergeRequestsService) ListMergeRequestPipelines(pid interface{}, mergeR
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/pipelines", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/pipelines", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -497,7 +497,7 @@ func (s *MergeRequestsService) CreateMergeRequestPipeline(pid interface{}, merge
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/pipelines", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/pipelines", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -530,7 +530,7 @@ func (s *MergeRequestsService) GetIssuesClosedOnMerge(pid interface{}, mergeRequ
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/closes_issues", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/closes_issues", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -576,7 +576,7 @@ func (s *MergeRequestsService) CreateMergeRequest(pid interface{}, opt *CreateMe
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/merge_requests", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -624,7 +624,7 @@ func (s *MergeRequestsService) UpdateMergeRequest(pid interface{}, mergeRequest
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -649,7 +649,7 @@ func (s *MergeRequestsService) DeleteMergeRequest(pid interface{}, mergeRequest
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -685,7 +685,7 @@ func (s *MergeRequestsService) AcceptMergeRequest(pid interface{}, mergeRequest
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/merge", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/merge", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -714,7 +714,7 @@ func (s *MergeRequestsService) CancelMergeWhenPipelineSucceeds(pid interface{},
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/cancel_merge_when_pipeline_succeeds", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/cancel_merge_when_pipeline_succeeds", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -741,7 +741,7 @@ func (s *MergeRequestsService) RebaseMergeRequest(pid interface{}, mergeRequest
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/rebase", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/rebase", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, nil, options)
 	if err != nil {
@@ -767,7 +767,7 @@ func (s *MergeRequestsService) GetMergeRequestDiffVersions(pid interface{}, merg
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/versions", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/versions", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -792,7 +792,7 @@ func (s *MergeRequestsService) GetSingleMergeRequestDiffVersion(pid interface{},
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/versions/%d", pathEscape(project), mergeRequest, version)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/versions/%d", PathEscape(project), mergeRequest, version)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -819,7 +819,7 @@ func (s *MergeRequestsService) SubscribeToMergeRequest(pid interface{}, mergeReq
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/subscribe", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/subscribe", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -847,7 +847,7 @@ func (s *MergeRequestsService) UnsubscribeFromMergeRequest(pid interface{}, merg
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/unsubscribe", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/unsubscribe", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -874,7 +874,7 @@ func (s *MergeRequestsService) CreateTodo(pid interface{}, mergeRequest int, opt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/todo", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/todo", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
diff --git a/milestones.go b/milestones.go
index e908a31..146f4c1 100644
--- a/milestones.go
+++ b/milestones.go
@@ -73,7 +73,7 @@ func (s *MilestonesService) ListMilestones(pid interface{}, opt *ListMilestonesO
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/milestones", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/milestones", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -98,7 +98,7 @@ func (s *MilestonesService) GetMilestone(pid interface{}, milestone int, options
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/milestones/%d", pathEscape(project), milestone)
+	u := fmt.Sprintf("projects/%s/milestones/%d", PathEscape(project), milestone)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -134,7 +134,7 @@ func (s *MilestonesService) CreateMilestone(pid interface{}, opt *CreateMileston
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/milestones", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/milestones", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -171,7 +171,7 @@ func (s *MilestonesService) UpdateMilestone(pid interface{}, milestone int, opt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/milestones/%d", pathEscape(project), milestone)
+	u := fmt.Sprintf("projects/%s/milestones/%d", PathEscape(project), milestone)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -196,7 +196,7 @@ func (s *MilestonesService) DeleteMilestone(pid interface{}, milestone int, opti
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/milestones/%d", pathEscape(project), milestone)
+	u := fmt.Sprintf("projects/%s/milestones/%d", PathEscape(project), milestone)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -220,7 +220,7 @@ func (s *MilestonesService) GetMilestoneIssues(pid interface{}, milestone int, o
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/milestones/%d/issues", pathEscape(project), milestone)
+	u := fmt.Sprintf("projects/%s/milestones/%d/issues", PathEscape(project), milestone)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -253,7 +253,7 @@ func (s *MilestonesService) GetMilestoneMergeRequests(pid interface{}, milestone
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/milestones/%d/merge_requests", pathEscape(project), milestone)
+	u := fmt.Sprintf("projects/%s/milestones/%d/merge_requests", PathEscape(project), milestone)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
diff --git a/namespaces.go b/namespaces.go
index c81b032..946ee4c 100644
--- a/namespaces.go
+++ b/namespaces.go
@@ -116,7 +116,7 @@ func (s *NamespacesService) GetNamespace(id interface{}, options ...RequestOptio
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("namespaces/%s", pathEscape(namespace))
+	u := fmt.Sprintf("namespaces/%s", PathEscape(namespace))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
diff --git a/notes.go b/notes.go
index 8c91223..1b77d2a 100644
--- a/notes.go
+++ b/notes.go
@@ -121,7 +121,7 @@ func (s *NotesService) ListIssueNotes(pid interface{}, issue int, opt *ListIssue
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/notes", pathEscape(project), issue)
+	u := fmt.Sprintf("projects/%s/issues/%d/notes", PathEscape(project), issue)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -146,7 +146,7 @@ func (s *NotesService) GetIssueNote(pid interface{}, issue, note int, options ..
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/notes/%d", pathEscape(project), issue, note)
+	u := fmt.Sprintf("projects/%s/issues/%d/notes/%d", PathEscape(project), issue, note)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -181,7 +181,7 @@ func (s *NotesService) CreateIssueNote(pid interface{}, issue int, opt *CreateIs
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/notes", pathEscape(project), issue)
+	u := fmt.Sprintf("projects/%s/issues/%d/notes", PathEscape(project), issue)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -215,7 +215,7 @@ func (s *NotesService) UpdateIssueNote(pid interface{}, issue, note int, opt *Up
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/notes/%d", pathEscape(project), issue, note)
+	u := fmt.Sprintf("projects/%s/issues/%d/notes/%d", PathEscape(project), issue, note)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -240,7 +240,7 @@ func (s *NotesService) DeleteIssueNote(pid interface{}, issue, note int, options
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/notes/%d", pathEscape(project), issue, note)
+	u := fmt.Sprintf("projects/%s/issues/%d/notes/%d", PathEscape(project), issue, note)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -270,7 +270,7 @@ func (s *NotesService) ListSnippetNotes(pid interface{}, snippet int, opt *ListS
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/snippets/%d/notes", pathEscape(project), snippet)
+	u := fmt.Sprintf("projects/%s/snippets/%d/notes", PathEscape(project), snippet)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -295,7 +295,7 @@ func (s *NotesService) GetSnippetNote(pid interface{}, snippet, note int, option
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/snippets/%d/notes/%d", pathEscape(project), snippet, note)
+	u := fmt.Sprintf("projects/%s/snippets/%d/notes/%d", PathEscape(project), snippet, note)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -330,7 +330,7 @@ func (s *NotesService) CreateSnippetNote(pid interface{}, snippet int, opt *Crea
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/snippets/%d/notes", pathEscape(project), snippet)
+	u := fmt.Sprintf("projects/%s/snippets/%d/notes", PathEscape(project), snippet)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -364,7 +364,7 @@ func (s *NotesService) UpdateSnippetNote(pid interface{}, snippet, note int, opt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/snippets/%d/notes/%d", pathEscape(project), snippet, note)
+	u := fmt.Sprintf("projects/%s/snippets/%d/notes/%d", PathEscape(project), snippet, note)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -389,7 +389,7 @@ func (s *NotesService) DeleteSnippetNote(pid interface{}, snippet, note int, opt
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/snippets/%d/notes/%d", pathEscape(project), snippet, note)
+	u := fmt.Sprintf("projects/%s/snippets/%d/notes/%d", PathEscape(project), snippet, note)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -419,7 +419,7 @@ func (s *NotesService) ListMergeRequestNotes(pid interface{}, mergeRequest int,
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/notes", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/notes", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -444,7 +444,7 @@ func (s *NotesService) GetMergeRequestNote(pid interface{}, mergeRequest, note i
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/notes/%d", pathEscape(project), mergeRequest, note)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/notes/%d", PathEscape(project), mergeRequest, note)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -478,7 +478,7 @@ func (s *NotesService) CreateMergeRequestNote(pid interface{}, mergeRequest int,
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/notes", pathEscape(project), mergeRequest)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/notes", PathEscape(project), mergeRequest)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -513,7 +513,7 @@ func (s *NotesService) UpdateMergeRequestNote(pid interface{}, mergeRequest, not
 		return nil, nil, err
 	}
 	u := fmt.Sprintf(
-		"projects/%s/merge_requests/%d/notes/%d", pathEscape(project), mergeRequest, note)
+		"projects/%s/merge_requests/%d/notes/%d", PathEscape(project), mergeRequest, note)
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
 		return nil, nil, err
@@ -538,7 +538,7 @@ func (s *NotesService) DeleteMergeRequestNote(pid interface{}, mergeRequest, not
 		return nil, err
 	}
 	u := fmt.Sprintf(
-		"projects/%s/merge_requests/%d/notes/%d", pathEscape(project), mergeRequest, note)
+		"projects/%s/merge_requests/%d/notes/%d", PathEscape(project), mergeRequest, note)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -567,7 +567,7 @@ func (s *NotesService) ListEpicNotes(gid interface{}, epic int, opt *ListEpicNot
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics/%d/notes", pathEscape(group), epic)
+	u := fmt.Sprintf("groups/%s/epics/%d/notes", PathEscape(group), epic)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -592,7 +592,7 @@ func (s *NotesService) GetEpicNote(gid interface{}, epic, note int, options ...R
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics/%d/notes/%d", pathEscape(group), epic, note)
+	u := fmt.Sprintf("groups/%s/epics/%d/notes/%d", PathEscape(group), epic, note)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -625,7 +625,7 @@ func (s *NotesService) CreateEpicNote(gid interface{}, epic int, opt *CreateEpic
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics/%d/notes", pathEscape(group), epic)
+	u := fmt.Sprintf("groups/%s/epics/%d/notes", PathEscape(group), epic)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -657,7 +657,7 @@ func (s *NotesService) UpdateEpicNote(gid interface{}, epic, note int, opt *Upda
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics/%d/notes/%d", pathEscape(group), epic, note)
+	u := fmt.Sprintf("groups/%s/epics/%d/notes/%d", PathEscape(group), epic, note)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -681,7 +681,7 @@ func (s *NotesService) DeleteEpicNote(gid interface{}, epic, note int, options .
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics/%d/notes/%d", pathEscape(group), epic, note)
+	u := fmt.Sprintf("groups/%s/epics/%d/notes/%d", PathEscape(group), epic, note)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/notifications.go b/notifications.go
index 06385b3..b4771d8 100644
--- a/notifications.go
+++ b/notifications.go
@@ -138,7 +138,7 @@ func (s *NotificationSettingsService) GetSettingsForGroup(gid interface{}, optio
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/notification_settings", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/notification_settings", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -163,7 +163,7 @@ func (s *NotificationSettingsService) GetSettingsForProject(pid interface{}, opt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/notification_settings", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/notification_settings", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -188,7 +188,7 @@ func (s *NotificationSettingsService) UpdateSettingsForGroup(gid interface{}, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/notification_settings", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/notification_settings", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -213,7 +213,7 @@ func (s *NotificationSettingsService) UpdateSettingsForProject(pid interface{},
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/notification_settings", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/notification_settings", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
diff --git a/packages.go b/packages.go
index 390ada2..cb70ec7 100644
--- a/packages.go
+++ b/packages.go
@@ -96,7 +96,7 @@ func (s *PackagesService) ListProjectPackages(pid interface{}, opt *ListProjectP
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/packages", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/packages", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -130,7 +130,7 @@ func (s *PackagesService) ListPackageFiles(pid interface{}, pkg int, opt *ListPa
 	}
 	u := fmt.Sprintf(
 		"projects/%s/packages/%d/package_files",
-		pathEscape(project),
+		PathEscape(project),
 		pkg,
 	)
 
@@ -157,7 +157,7 @@ func (s *PackagesService) DeleteProjectPackage(pid interface{}, pkg int, options
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/packages/%d", pathEscape(project), pkg)
+	u := fmt.Sprintf("projects/%s/packages/%d", PathEscape(project), pkg)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/pages.go b/pages.go
index 167551b..617b0ba 100644
--- a/pages.go
+++ b/pages.go
@@ -34,7 +34,7 @@ func (s *PagesService) UnpublishPages(gid interface{}, options ...RequestOptionF
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pages", pathEscape(page))
+	u := fmt.Sprintf("projects/%s/pages", PathEscape(page))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/pages_domains.go b/pages_domains.go
index 52b6f7b..3e1b04f 100644
--- a/pages_domains.go
+++ b/pages_domains.go
@@ -62,7 +62,7 @@ func (s *PagesDomainsService) ListPagesDomains(pid interface{}, opt *ListPagesDo
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pages/domains", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/pages/domains", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -106,7 +106,7 @@ func (s *PagesDomainsService) GetPagesDomain(pid interface{}, domain string, opt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pages/domains/%s", pathEscape(project), domain)
+	u := fmt.Sprintf("projects/%s/pages/domains/%s", PathEscape(project), domain)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -142,7 +142,7 @@ func (s *PagesDomainsService) CreatePagesDomain(pid interface{}, opt *CreatePage
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pages/domains", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/pages/domains", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -177,7 +177,7 @@ func (s *PagesDomainsService) UpdatePagesDomain(pid interface{}, domain string,
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pages/domains/%s", pathEscape(project), domain)
+	u := fmt.Sprintf("projects/%s/pages/domains/%s", PathEscape(project), domain)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -202,7 +202,7 @@ func (s *PagesDomainsService) DeletePagesDomain(pid interface{}, domain string,
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pages/domains/%s", pathEscape(project), domain)
+	u := fmt.Sprintf("projects/%s/pages/domains/%s", PathEscape(project), domain)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/pipeline_schedules.go b/pipeline_schedules.go
index 8a35ecf..12640e2 100644
--- a/pipeline_schedules.go
+++ b/pipeline_schedules.go
@@ -69,7 +69,7 @@ func (s *PipelineSchedulesService) ListPipelineSchedules(pid interface{}, opt *L
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipeline_schedules", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/pipeline_schedules", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -94,7 +94,7 @@ func (s *PipelineSchedulesService) GetPipelineSchedule(pid interface{}, schedule
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipeline_schedules/%d", pathEscape(project), schedule)
+	u := fmt.Sprintf("projects/%s/pipeline_schedules/%d", PathEscape(project), schedule)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -132,7 +132,7 @@ func (s *PipelineSchedulesService) CreatePipelineSchedule(pid interface{}, opt *
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipeline_schedules", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/pipeline_schedules", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -170,7 +170,7 @@ func (s *PipelineSchedulesService) EditPipelineSchedule(pid interface{}, schedul
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipeline_schedules/%d", pathEscape(project), schedule)
+	u := fmt.Sprintf("projects/%s/pipeline_schedules/%d", PathEscape(project), schedule)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -196,7 +196,7 @@ func (s *PipelineSchedulesService) TakeOwnershipOfPipelineSchedule(pid interface
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipeline_schedules/%d/take_ownership", pathEscape(project), schedule)
+	u := fmt.Sprintf("projects/%s/pipeline_schedules/%d/take_ownership", PathEscape(project), schedule)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -221,7 +221,7 @@ func (s *PipelineSchedulesService) DeletePipelineSchedule(pid interface{}, sched
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipeline_schedules/%d", pathEscape(project), schedule)
+	u := fmt.Sprintf("projects/%s/pipeline_schedules/%d", PathEscape(project), schedule)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -240,7 +240,7 @@ func (s *PipelineSchedulesService) RunPipelineSchedule(pid interface{}, schedule
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipeline_schedules/%d/play", pathEscape(project), schedule)
+	u := fmt.Sprintf("projects/%s/pipeline_schedules/%d/play", PathEscape(project), schedule)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -270,7 +270,7 @@ func (s *PipelineSchedulesService) CreatePipelineScheduleVariable(pid interface{
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipeline_schedules/%d/variables", pathEscape(project), schedule)
+	u := fmt.Sprintf("projects/%s/pipeline_schedules/%d/variables", PathEscape(project), schedule)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -305,7 +305,7 @@ func (s *PipelineSchedulesService) EditPipelineScheduleVariable(pid interface{},
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipeline_schedules/%d/variables/%s", pathEscape(project), schedule, key)
+	u := fmt.Sprintf("projects/%s/pipeline_schedules/%d/variables/%s", PathEscape(project), schedule, key)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -330,7 +330,7 @@ func (s *PipelineSchedulesService) DeletePipelineScheduleVariable(pid interface{
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipeline_schedules/%d/variables/%s", pathEscape(project), schedule, key)
+	u := fmt.Sprintf("projects/%s/pipeline_schedules/%d/variables/%s", PathEscape(project), schedule, key)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/pipeline_triggers.go b/pipeline_triggers.go
index 7fc5875..c2cecfa 100644
--- a/pipeline_triggers.go
+++ b/pipeline_triggers.go
@@ -60,7 +60,7 @@ func (s *PipelineTriggersService) ListPipelineTriggers(pid interface{}, opt *Lis
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/triggers", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/triggers", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -85,7 +85,7 @@ func (s *PipelineTriggersService) GetPipelineTrigger(pid interface{}, trigger in
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/triggers/%d", pathEscape(project), trigger)
+	u := fmt.Sprintf("projects/%s/triggers/%d", PathEscape(project), trigger)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -118,7 +118,7 @@ func (s *PipelineTriggersService) AddPipelineTrigger(pid interface{}, opt *AddPi
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/triggers", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/triggers", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -151,7 +151,7 @@ func (s *PipelineTriggersService) EditPipelineTrigger(pid interface{}, trigger i
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/triggers/%d", pathEscape(project), trigger)
+	u := fmt.Sprintf("projects/%s/triggers/%d", PathEscape(project), trigger)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -177,7 +177,7 @@ func (s *PipelineTriggersService) TakeOwnershipOfPipelineTrigger(pid interface{}
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/triggers/%d/take_ownership", pathEscape(project), trigger)
+	u := fmt.Sprintf("projects/%s/triggers/%d/take_ownership", PathEscape(project), trigger)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -202,7 +202,7 @@ func (s *PipelineTriggersService) DeletePipelineTrigger(pid interface{}, trigger
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/triggers/%d", pathEscape(project), trigger)
+	u := fmt.Sprintf("projects/%s/triggers/%d", PathEscape(project), trigger)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -231,7 +231,7 @@ func (s *PipelineTriggersService) RunPipelineTrigger(pid interface{}, opt *RunPi
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/trigger/pipeline", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/trigger/pipeline", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
diff --git a/pipelines.go b/pipelines.go
index e52e3f8..bce8211 100644
--- a/pipelines.go
+++ b/pipelines.go
@@ -172,7 +172,7 @@ func (s *PipelinesService) ListProjectPipelines(pid interface{}, opt *ListProjec
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipelines", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/pipelines", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -196,7 +196,7 @@ func (s *PipelinesService) GetPipeline(pid interface{}, pipeline int, options ..
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipelines/%d", pathEscape(project), pipeline)
+	u := fmt.Sprintf("projects/%s/pipelines/%d", PathEscape(project), pipeline)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -220,7 +220,7 @@ func (s *PipelinesService) GetPipelineVariables(pid interface{}, pipeline int, o
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipelines/%d/variables", pathEscape(project), pipeline)
+	u := fmt.Sprintf("projects/%s/pipelines/%d/variables", PathEscape(project), pipeline)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -244,7 +244,7 @@ func (s *PipelinesService) GetPipelineTestReport(pid interface{}, pipeline int)
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipelines/%d/test_report", pathEscape(project), pipeline)
+	u := fmt.Sprintf("projects/%s/pipelines/%d/test_report", PathEscape(project), pipeline)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, nil)
 	if err != nil {
@@ -276,7 +276,7 @@ func (s *PipelinesService) CreatePipeline(pid interface{}, opt *CreatePipelineOp
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipeline", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/pipeline", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -301,7 +301,7 @@ func (s *PipelinesService) RetryPipelineBuild(pid interface{}, pipeline int, opt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipelines/%d/retry", pathEscape(project), pipeline)
+	u := fmt.Sprintf("projects/%s/pipelines/%d/retry", PathEscape(project), pipeline)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -326,7 +326,7 @@ func (s *PipelinesService) CancelPipelineBuild(pid interface{}, pipeline int, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipelines/%d/cancel", pathEscape(project), pipeline)
+	u := fmt.Sprintf("projects/%s/pipelines/%d/cancel", PathEscape(project), pipeline)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -351,7 +351,7 @@ func (s *PipelinesService) DeletePipeline(pid interface{}, pipeline int, options
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/pipelines/%d", pathEscape(project), pipeline)
+	u := fmt.Sprintf("projects/%s/pipelines/%d", PathEscape(project), pipeline)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/project_access_tokens.go b/project_access_tokens.go
index 2bcc7da..4a63d99 100644
--- a/project_access_tokens.go
+++ b/project_access_tokens.go
@@ -67,7 +67,7 @@ func (s *ProjectAccessTokensService) ListProjectAccessTokens(pid interface{}, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/access_tokens", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/access_tokens", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -104,7 +104,7 @@ func (s *ProjectAccessTokensService) CreateProjectAccessToken(pid interface{}, o
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/access_tokens", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/access_tokens", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -129,7 +129,7 @@ func (s *ProjectAccessTokensService) DeleteProjectAccessToken(pid interface{}, i
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/access_tokens/%d", pathEscape(project), id)
+	u := fmt.Sprintf("projects/%s/access_tokens/%d", PathEscape(project), id)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/project_badges.go b/project_badges.go
index e575f8e..2fce3e0 100644
--- a/project_badges.go
+++ b/project_badges.go
@@ -59,7 +59,7 @@ func (s *ProjectBadgesService) ListProjectBadges(pid interface{}, opt *ListProje
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/badges", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/badges", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -84,7 +84,7 @@ func (s *ProjectBadgesService) GetProjectBadge(pid interface{}, badge int, optio
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/badges/%d", pathEscape(project), badge)
+	u := fmt.Sprintf("projects/%s/badges/%d", PathEscape(project), badge)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -118,7 +118,7 @@ func (s *ProjectBadgesService) AddProjectBadge(pid interface{}, opt *AddProjectB
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/badges", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/badges", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -152,7 +152,7 @@ func (s *ProjectBadgesService) EditProjectBadge(pid interface{}, badge int, opt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/badges/%d", pathEscape(project), badge)
+	u := fmt.Sprintf("projects/%s/badges/%d", PathEscape(project), badge)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -178,7 +178,7 @@ func (s *ProjectBadgesService) DeleteProjectBadge(pid interface{}, badge int, op
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/badges/%d", pathEscape(project), badge)
+	u := fmt.Sprintf("projects/%s/badges/%d", PathEscape(project), badge)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -207,7 +207,7 @@ func (s *ProjectBadgesService) PreviewProjectBadge(pid interface{}, opt *Project
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/badges/render", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/badges/render", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
diff --git a/project_clusters.go b/project_clusters.go
index 17fd09b..f515821 100644
--- a/project_clusters.go
+++ b/project_clusters.go
@@ -82,7 +82,7 @@ func (s *ProjectClustersService) ListClusters(pid interface{}, options ...Reques
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/clusters", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/clusters", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -107,7 +107,7 @@ func (s *ProjectClustersService) GetCluster(pid interface{}, cluster int, option
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/clusters/%d", pathEscape(project), cluster)
+	u := fmt.Sprintf("projects/%s/clusters/%d", PathEscape(project), cluster)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -155,7 +155,7 @@ func (s *ProjectClustersService) AddCluster(pid interface{}, opt *AddClusterOpti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/clusters/user", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/clusters/user", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -200,7 +200,7 @@ func (s *ProjectClustersService) EditCluster(pid interface{}, cluster int, opt *
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/clusters/%d", pathEscape(project), cluster)
+	u := fmt.Sprintf("projects/%s/clusters/%d", PathEscape(project), cluster)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -225,7 +225,7 @@ func (s *ProjectClustersService) DeleteCluster(pid interface{}, cluster int, opt
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/clusters/%d", pathEscape(project), cluster)
+	u := fmt.Sprintf("projects/%s/clusters/%d", PathEscape(project), cluster)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/project_import_export.go b/project_import_export.go
index 8c89f4e..6caef39 100644
--- a/project_import_export.go
+++ b/project_import_export.go
@@ -96,7 +96,7 @@ func (s *ProjectImportExportService) ScheduleExport(pid interface{}, opt *Schedu
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/export", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/export", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -115,7 +115,7 @@ func (s *ProjectImportExportService) ExportStatus(pid interface{}, options ...Re
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/export", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/export", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -140,7 +140,7 @@ func (s *ProjectImportExportService) ExportDownload(pid interface{}, options ...
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/export/download", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/export/download", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -196,7 +196,7 @@ func (s *ProjectImportExportService) ImportStatus(pid interface{}, options ...Re
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/import", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/import", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
diff --git a/project_managed_licenses.go b/project_managed_licenses.go
index 186bdef..25c8ef6 100644
--- a/project_managed_licenses.go
+++ b/project_managed_licenses.go
@@ -47,7 +47,7 @@ func (s *ManagedLicensesService) ListManagedLicenses(pid interface{}, options ..
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/managed_licenses", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/managed_licenses", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -76,7 +76,7 @@ func (s *ManagedLicensesService) GetManagedLicense(pid, mlid interface{}, option
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/managed_licenses/%s", pathEscape(project), pathEscape(license))
+	u := fmt.Sprintf("projects/%s/managed_licenses/%s", PathEscape(project), PathEscape(license))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -110,7 +110,7 @@ func (s *ManagedLicensesService) AddManagedLicense(pid interface{}, opt *AddMana
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/managed_licenses", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/managed_licenses", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -139,7 +139,7 @@ func (s *ManagedLicensesService) DeleteManagedLicense(pid, mlid interface{}, opt
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/managed_licenses/%s", pathEscape(project), pathEscape(license))
+	u := fmt.Sprintf("projects/%s/managed_licenses/%s", PathEscape(project), PathEscape(license))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -171,7 +171,7 @@ func (s *ManagedLicensesService) EditManagedLicense(pid, mlid interface{}, opt *
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/managed_licenses/%s", pathEscape(project), pathEscape(license))
+	u := fmt.Sprintf("projects/%s/managed_licenses/%s", PathEscape(project), PathEscape(license))
 
 	req, err := s.client.NewRequest(http.MethodPatch, u, opt, options)
 	if err != nil {
diff --git a/project_members.go b/project_members.go
index 4f00a11..ad588bd 100644
--- a/project_members.go
+++ b/project_members.go
@@ -50,7 +50,7 @@ func (s *ProjectMembersService) ListProjectMembers(pid interface{}, opt *ListPro
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/members", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/members", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -77,7 +77,7 @@ func (s *ProjectMembersService) ListAllProjectMembers(pid interface{}, opt *List
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/members/all", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/members/all", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -102,7 +102,7 @@ func (s *ProjectMembersService) GetProjectMember(pid interface{}, user int, opti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/members/%d", pathEscape(project), user)
+	u := fmt.Sprintf("projects/%s/members/%d", PathEscape(project), user)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -127,7 +127,7 @@ func (s *ProjectMembersService) GetInheritedProjectMember(pid interface{}, user
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/members/all/%d", pathEscape(project), user)
+	u := fmt.Sprintf("projects/%s/members/all/%d", PathEscape(project), user)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -165,7 +165,7 @@ func (s *ProjectMembersService) AddProjectMember(pid interface{}, opt *AddProjec
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/members", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/members", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -199,7 +199,7 @@ func (s *ProjectMembersService) EditProjectMember(pid interface{}, user int, opt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/members/%d", pathEscape(project), user)
+	u := fmt.Sprintf("projects/%s/members/%d", PathEscape(project), user)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -224,7 +224,7 @@ func (s *ProjectMembersService) DeleteProjectMember(pid interface{}, user int, o
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/members/%d", pathEscape(project), user)
+	u := fmt.Sprintf("projects/%s/members/%d", PathEscape(project), user)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/project_mirror.go b/project_mirror.go
index 2560a3c..20b4f7b 100644
--- a/project_mirror.go
+++ b/project_mirror.go
@@ -58,7 +58,7 @@ func (s *ProjectMirrorService) ListProjectMirror(pid interface{}, opt *ListProje
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/remote_mirrors", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/remote_mirrors", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -95,7 +95,7 @@ func (s *ProjectMirrorService) AddProjectMirror(pid interface{}, opt *AddProject
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/remote_mirrors", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/remote_mirrors", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -131,7 +131,7 @@ func (s *ProjectMirrorService) EditProjectMirror(pid interface{}, mirror int, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/remote_mirrors/%d", pathEscape(project), mirror)
+	u := fmt.Sprintf("projects/%s/remote_mirrors/%d", PathEscape(project), mirror)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
diff --git a/project_snippets.go b/project_snippets.go
index 1ab5e2b..6bbaeaf 100644
--- a/project_snippets.go
+++ b/project_snippets.go
@@ -43,7 +43,7 @@ func (s *ProjectSnippetsService) ListSnippets(pid interface{}, opt *ListProjectS
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/snippets", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/snippets", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -68,7 +68,7 @@ func (s *ProjectSnippetsService) GetSnippet(pid interface{}, snippet int, option
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/snippets/%d", pathEscape(project), snippet)
+	u := fmt.Sprintf("projects/%s/snippets/%d", PathEscape(project), snippet)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -106,7 +106,7 @@ func (s *ProjectSnippetsService) CreateSnippet(pid interface{}, opt *CreateProje
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/snippets", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/snippets", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -144,7 +144,7 @@ func (s *ProjectSnippetsService) UpdateSnippet(pid interface{}, snippet int, opt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/snippets/%d", pathEscape(project), snippet)
+	u := fmt.Sprintf("projects/%s/snippets/%d", PathEscape(project), snippet)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -171,7 +171,7 @@ func (s *ProjectSnippetsService) DeleteSnippet(pid interface{}, snippet int, opt
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/snippets/%d", pathEscape(project), snippet)
+	u := fmt.Sprintf("projects/%s/snippets/%d", PathEscape(project), snippet)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -190,7 +190,7 @@ func (s *ProjectSnippetsService) SnippetContent(pid interface{}, snippet int, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/snippets/%d/raw", pathEscape(project), snippet)
+	u := fmt.Sprintf("projects/%s/snippets/%d/raw", PathEscape(project), snippet)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
diff --git a/project_variables.go b/project_variables.go
index 69ce487..2c4d4e9 100644
--- a/project_variables.go
+++ b/project_variables.go
@@ -64,7 +64,7 @@ func (s *ProjectVariablesService) ListVariables(pid interface{}, opt *ListProjec
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/variables", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/variables", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -89,7 +89,7 @@ func (s *ProjectVariablesService) GetVariable(pid interface{}, key string, optio
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/variables/%s", pathEscape(project), url.PathEscape(key))
+	u := fmt.Sprintf("projects/%s/variables/%s", PathEscape(project), url.PathEscape(key))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -128,7 +128,7 @@ func (s *ProjectVariablesService) CreateVariable(pid interface{}, opt *CreatePro
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/variables", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/variables", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -166,7 +166,7 @@ func (s *ProjectVariablesService) UpdateVariable(pid interface{}, key string, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/variables/%s", pathEscape(project), url.PathEscape(key))
+	u := fmt.Sprintf("projects/%s/variables/%s", PathEscape(project), url.PathEscape(key))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -191,7 +191,7 @@ func (s *ProjectVariablesService) RemoveVariable(pid interface{}, key string, op
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/variables/%s", pathEscape(project), url.PathEscape(key))
+	u := fmt.Sprintf("projects/%s/variables/%s", PathEscape(project), url.PathEscape(key))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/projects.go b/projects.go
index 0b9f180..9403d13 100644
--- a/projects.go
+++ b/projects.go
@@ -369,7 +369,7 @@ func (s *ProjectsService) ListProjectsUsers(pid interface{}, opt *ListProjectUse
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/users", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/users", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -416,7 +416,7 @@ func (s *ProjectsService) ListProjectsGroups(pid interface{}, opt *ListProjectGr
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/groups", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/groups", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -445,7 +445,7 @@ func (s *ProjectsService) GetProjectLanguages(pid interface{}, options ...Reques
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/languages", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/languages", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -480,7 +480,7 @@ func (s *ProjectsService) GetProject(pid interface{}, opt *GetProjectOptions, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s", pathEscape(project))
+	u := fmt.Sprintf("projects/%s", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -541,7 +541,7 @@ func (s *ProjectsService) GetProjectEvents(pid interface{}, opt *GetProjectEvent
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/events", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/events", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -791,7 +791,7 @@ func (s *ProjectsService) EditProject(pid interface{}, opt *EditProjectOptions,
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s", pathEscape(project))
+	u := fmt.Sprintf("projects/%s", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -825,7 +825,7 @@ func (s *ProjectsService) ForkProject(pid interface{}, opt *ForkProjectOptions,
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/fork", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/fork", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -850,7 +850,7 @@ func (s *ProjectsService) StarProject(pid interface{}, options ...RequestOptionF
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/star", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/star", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -875,7 +875,7 @@ func (s *ProjectsService) UnstarProject(pid interface{}, options ...RequestOptio
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/unstar", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/unstar", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -901,7 +901,7 @@ func (s *ProjectsService) ArchiveProject(pid interface{}, options ...RequestOpti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/archive", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/archive", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -927,7 +927,7 @@ func (s *ProjectsService) UnarchiveProject(pid interface{}, options ...RequestOp
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/unarchive", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/unarchive", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -952,7 +952,7 @@ func (s *ProjectsService) DeleteProject(pid interface{}, options ...RequestOptio
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s", pathEscape(project))
+	u := fmt.Sprintf("projects/%s", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -979,7 +979,7 @@ func (s *ProjectsService) ShareProjectWithGroup(pid interface{}, opt *ShareWithG
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/share", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/share", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -997,7 +997,7 @@ func (s *ProjectsService) DeleteSharedProjectFromGroup(pid interface{}, groupID
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/share/%d", pathEscape(project), groupID)
+	u := fmt.Sprintf("projects/%s/share/%d", PathEscape(project), groupID)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -1063,7 +1063,7 @@ func (s *ProjectsService) ListProjectHooks(pid interface{}, opt *ListProjectHook
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/hooks", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/hooks", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -1088,7 +1088,7 @@ func (s *ProjectsService) GetProjectHook(pid interface{}, hook int, options ...R
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/hooks/%d", pathEscape(project), hook)
+	u := fmt.Sprintf("projects/%s/hooks/%d", PathEscape(project), hook)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -1136,7 +1136,7 @@ func (s *ProjectsService) AddProjectHook(pid interface{}, opt *AddProjectHookOpt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/hooks", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/hooks", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -1184,7 +1184,7 @@ func (s *ProjectsService) EditProjectHook(pid interface{}, hook int, opt *EditPr
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/hooks/%d", pathEscape(project), hook)
+	u := fmt.Sprintf("projects/%s/hooks/%d", PathEscape(project), hook)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -1210,7 +1210,7 @@ func (s *ProjectsService) DeleteProjectHook(pid interface{}, hook int, options .
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/hooks/%d", pathEscape(project), hook)
+	u := fmt.Sprintf("projects/%s/hooks/%d", PathEscape(project), hook)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -1286,7 +1286,7 @@ func (s *ProjectsService) UploadFile(pid interface{}, file string, options ...Re
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/uploads", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/uploads", PathEscape(project))
 
 	f, err := os.Open(file)
 	if err != nil {
@@ -1340,7 +1340,7 @@ func (s *ProjectsService) ListProjectForks(pid interface{}, opt *ListProjectsOpt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/forks", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/forks", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -1386,7 +1386,7 @@ func (s *ProjectsService) GetProjectPushRules(pid interface{}, options ...Reques
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/push_rule", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/push_rule", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -1430,7 +1430,7 @@ func (s *ProjectsService) AddProjectPushRule(pid interface{}, opt *AddProjectPus
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/push_rule", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/push_rule", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -1474,7 +1474,7 @@ func (s *ProjectsService) EditProjectPushRule(pid interface{}, opt *EditProjectP
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/push_rule", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/push_rule", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -1501,7 +1501,7 @@ func (s *ProjectsService) DeleteProjectPushRule(pid interface{}, options ...Requ
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/push_rule", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/push_rule", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -1535,7 +1535,7 @@ func (s *ProjectsService) GetApprovalConfiguration(pid interface{}, options ...R
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/approvals", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/approvals", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -1574,7 +1574,7 @@ func (s *ProjectsService) ChangeApprovalConfiguration(pid interface{}, opt *Chan
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/approvals", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/approvals", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -1599,7 +1599,7 @@ func (s *ProjectsService) GetProjectApprovalRules(pid interface{}, options ...Re
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/approval_rules", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/approval_rules", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -1637,7 +1637,7 @@ func (s *ProjectsService) CreateProjectApprovalRule(pid interface{}, opt *Create
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/approval_rules", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/approval_rules", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -1675,7 +1675,7 @@ func (s *ProjectsService) UpdateProjectApprovalRule(pid interface{}, approvalRul
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/approval_rules/%d", pathEscape(project), approvalRule)
+	u := fmt.Sprintf("projects/%s/approval_rules/%d", PathEscape(project), approvalRule)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -1700,7 +1700,7 @@ func (s *ProjectsService) DeleteProjectApprovalRule(pid interface{}, approvalRul
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/approval_rules/%d", pathEscape(project), approvalRule)
+	u := fmt.Sprintf("projects/%s/approval_rules/%d", PathEscape(project), approvalRule)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -1729,7 +1729,7 @@ func (s *ProjectsService) ChangeAllowedApprovers(pid interface{}, opt *ChangeAll
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/approvers", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/approvers", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -1754,7 +1754,7 @@ func (s *ProjectsService) StartMirroringProject(pid interface{}, options ...Requ
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/mirror/pull", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/mirror/pull", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -1784,7 +1784,7 @@ func (s *ProjectsService) TransferProject(pid interface{}, opt *TransferProjectO
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/transfer", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/transfer", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
diff --git a/protected_branches.go b/protected_branches.go
index 11ef66c..86a58a4 100644
--- a/protected_branches.go
+++ b/protected_branches.go
@@ -73,7 +73,7 @@ func (s *ProtectedBranchesService) ListProtectedBranches(pid interface{}, opt *L
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/protected_branches", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/protected_branches", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -98,7 +98,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), url.PathEscape(branch))
+	u := fmt.Sprintf("projects/%s/protected_branches/%s", PathEscape(project), url.PathEscape(branch))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -152,7 +152,7 @@ func (s *ProtectedBranchesService) ProtectRepositoryBranches(pid interface{}, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/protected_branches", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/protected_branches", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -178,7 +178,7 @@ func (s *ProtectedBranchesService) UnprotectRepositoryBranches(pid interface{},
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/protected_branches/%s", pathEscape(project), url.PathEscape(branch))
+	u := fmt.Sprintf("projects/%s/protected_branches/%s", PathEscape(project), url.PathEscape(branch))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -206,7 +206,7 @@ func (s *ProtectedBranchesService) RequireCodeOwnerApprovals(pid interface{}, br
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/protected_branches/%s", pathEscape(project), url.PathEscape(branch))
+	u := fmt.Sprintf("projects/%s/protected_branches/%s", PathEscape(project), url.PathEscape(branch))
 
 	req, err := s.client.NewRequest(http.MethodPatch, u, opt, options)
 	if err != nil {
diff --git a/protected_environments.go b/protected_environments.go
index e532ae6..00875be 100644
--- a/protected_environments.go
+++ b/protected_environments.go
@@ -67,7 +67,7 @@ func (s *ProtectedEnvironmentsService) ListProtectedEnvironments(pid interface{}
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/protected_environments", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/protected_environments", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -92,7 +92,7 @@ func (s *ProtectedEnvironmentsService) GetProtectedEnvironment(pid interface{},
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/protected_environments/%s", pathEscape(project), pathEscape(environment))
+	u := fmt.Sprintf("projects/%s/protected_environments/%s", PathEscape(project), PathEscape(environment))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -139,7 +139,7 @@ func (s *ProtectedEnvironmentsService) ProtectRepositoryEnvironments(pid interfa
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/protected_environments", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/protected_environments", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -165,7 +165,7 @@ func (s *ProtectedEnvironmentsService) UnprotectEnvironment(pid interface{}, env
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/protected_environments/%s", pathEscape(project), pathEscape(environment))
+	u := fmt.Sprintf("projects/%s/protected_environments/%s", PathEscape(project), PathEscape(environment))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/protected_tags.go b/protected_tags.go
index 628f8a2..f53c989 100644
--- a/protected_tags.go
+++ b/protected_tags.go
@@ -64,7 +64,7 @@ func (s *ProtectedTagsService) ListProtectedTags(pid interface{}, opt *ListProte
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/protected_tags", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/protected_tags", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -89,7 +89,7 @@ func (s *ProtectedTagsService) GetProtectedTag(pid interface{}, tag string, opti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/protected_tags/%s", pathEscape(project), pathEscape(tag))
+	u := fmt.Sprintf("projects/%s/protected_tags/%s", PathEscape(project), PathEscape(tag))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -125,7 +125,7 @@ func (s *ProtectedTagsService) ProtectRepositoryTags(pid interface{}, opt *Prote
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/protected_tags", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/protected_tags", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -151,7 +151,7 @@ func (s *ProtectedTagsService) UnprotectRepositoryTags(pid interface{}, tag stri
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/protected_tags/%s", pathEscape(project), pathEscape(tag))
+	u := fmt.Sprintf("projects/%s/protected_tags/%s", PathEscape(project), PathEscape(tag))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/releaselinks.go b/releaselinks.go
index 5c1624c..1c74be5 100644
--- a/releaselinks.go
+++ b/releaselinks.go
@@ -54,7 +54,7 @@ func (s *ReleaseLinksService) ListReleaseLinks(pid interface{}, tagName string,
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/releases/%s/assets/links", pathEscape(project), pathEscape(tagName))
+	u := fmt.Sprintf("projects/%s/releases/%s/assets/links", PathEscape(project), PathEscape(tagName))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -79,8 +79,8 @@ func (s *ReleaseLinksService) GetReleaseLink(pid interface{}, tagName string, li
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/releases/%s/assets/links/%d",
-		pathEscape(project),
-		pathEscape(tagName),
+		PathEscape(project),
+		PathEscape(tagName),
 		link)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
@@ -115,7 +115,7 @@ func (s *ReleaseLinksService) CreateReleaseLink(pid interface{}, tagName string,
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/releases/%s/assets/links", pathEscape(project), pathEscape(tagName))
+	u := fmt.Sprintf("projects/%s/releases/%s/assets/links", PathEscape(project), PathEscape(tagName))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -152,8 +152,8 @@ func (s *ReleaseLinksService) UpdateReleaseLink(pid interface{}, tagName string,
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/releases/%s/assets/links/%d",
-		pathEscape(project),
-		pathEscape(tagName),
+		PathEscape(project),
+		PathEscape(tagName),
 		link)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
@@ -179,8 +179,8 @@ func (s *ReleaseLinksService) DeleteReleaseLink(pid interface{}, tagName string,
 		return nil, nil, err
 	}
 	u := fmt.Sprintf("projects/%s/releases/%s/assets/links/%d",
-		pathEscape(project),
-		pathEscape(tagName),
+		PathEscape(project),
+		PathEscape(tagName),
 		link,
 	)
 
diff --git a/releases.go b/releases.go
index 5140a60..85fa426 100644
--- a/releases.go
+++ b/releases.go
@@ -75,7 +75,7 @@ func (s *ReleasesService) ListReleases(pid interface{}, opt *ListReleasesOptions
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/releases", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/releases", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -100,7 +100,7 @@ func (s *ReleasesService) GetRelease(pid interface{}, tagName string, options ..
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/releases/%s", pathEscape(project), pathEscape(tagName))
+	u := fmt.Sprintf("projects/%s/releases/%s", PathEscape(project), PathEscape(tagName))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -159,7 +159,7 @@ func (s *ReleasesService) CreateRelease(pid interface{}, opts *CreateReleaseOpti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/releases", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/releases", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opts, options)
 	if err != nil {
@@ -195,7 +195,7 @@ func (s *ReleasesService) UpdateRelease(pid interface{}, tagName string, opts *U
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/releases/%s", pathEscape(project), pathEscape(tagName))
+	u := fmt.Sprintf("projects/%s/releases/%s", PathEscape(project), PathEscape(tagName))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opts, options)
 	if err != nil {
@@ -220,7 +220,7 @@ func (s *ReleasesService) DeleteRelease(pid interface{}, tagName string, options
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/releases/%s", pathEscape(project), pathEscape(tagName))
+	u := fmt.Sprintf("projects/%s/releases/%s", PathEscape(project), PathEscape(tagName))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/repositories.go b/repositories.go
index b9c99cf..70b8f2b 100644
--- a/repositories.go
+++ b/repositories.go
@@ -67,7 +67,7 @@ func (s *RepositoriesService) ListTree(pid interface{}, opt *ListTreeOptions, op
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/tree", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/repository/tree", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -93,7 +93,7 @@ func (s *RepositoriesService) Blob(pid interface{}, sha string, options ...Reque
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/blobs/%s", pathEscape(project), url.PathEscape(sha))
+	u := fmt.Sprintf("projects/%s/repository/blobs/%s", PathEscape(project), url.PathEscape(sha))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -118,7 +118,7 @@ func (s *RepositoriesService) RawBlobContent(pid interface{}, sha string, option
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/blobs/%s/raw", pathEscape(project), url.PathEscape(sha))
+	u := fmt.Sprintf("projects/%s/repository/blobs/%s/raw", PathEscape(project), url.PathEscape(sha))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -152,7 +152,7 @@ func (s *RepositoriesService) Archive(pid interface{}, opt *ArchiveOptions, opti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/archive", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/repository/archive", PathEscape(project))
 
 	// Set an optional format for the archive.
 	if opt != nil && opt.Format != nil {
@@ -183,7 +183,7 @@ func (s *RepositoriesService) StreamArchive(pid interface{}, w io.Writer, opt *A
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/archive", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/repository/archive", PathEscape(project))
 
 	// Set an optional format for the archive.
 	if opt != nil && opt.Format != nil {
@@ -233,7 +233,7 @@ func (s *RepositoriesService) Compare(pid interface{}, opt *CompareOptions, opti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/compare", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/repository/compare", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -281,7 +281,7 @@ func (s *RepositoriesService) Contributors(pid interface{}, opt *ListContributor
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/contributors", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/repository/contributors", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -315,7 +315,7 @@ func (s *RepositoriesService) MergeBase(pid interface{}, opt *MergeBaseOptions,
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/merge_base", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/repository/merge_base", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
diff --git a/repository_files.go b/repository_files.go
index f9e9ab0..64189f3 100644
--- a/repository_files.go
+++ b/repository_files.go
@@ -72,8 +72,8 @@ func (s *RepositoryFilesService) GetFile(pid interface{}, fileName string, opt *
 	}
 	u := fmt.Sprintf(
 		"projects/%s/repository/files/%s",
-		pathEscape(project),
-		pathEscape(fileName),
+		PathEscape(project),
+		PathEscape(fileName),
 	)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
@@ -110,8 +110,8 @@ func (s *RepositoryFilesService) GetFileMetaData(pid interface{}, fileName strin
 	}
 	u := fmt.Sprintf(
 		"projects/%s/repository/files/%s",
-		pathEscape(project),
-		pathEscape(fileName),
+		PathEscape(project),
+		PathEscape(fileName),
 	)
 
 	req, err := s.client.NewRequest(http.MethodHead, u, opt, options)
@@ -187,8 +187,8 @@ func (s *RepositoryFilesService) GetFileBlame(pid interface{}, file string, opt
 	}
 	u := fmt.Sprintf(
 		"projects/%s/repository/files/%s/blame",
-		pathEscape(project),
-		pathEscape(file),
+		PathEscape(project),
+		PathEscape(file),
 	)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
@@ -224,8 +224,8 @@ func (s *RepositoryFilesService) GetRawFile(pid interface{}, fileName string, op
 	}
 	u := fmt.Sprintf(
 		"projects/%s/repository/files/%s/raw",
-		pathEscape(project),
-		pathEscape(fileName),
+		PathEscape(project),
+		PathEscape(fileName),
 	)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
@@ -279,8 +279,8 @@ func (s *RepositoryFilesService) CreateFile(pid interface{}, fileName string, op
 	}
 	u := fmt.Sprintf(
 		"projects/%s/repository/files/%s",
-		pathEscape(project),
-		pathEscape(fileName),
+		PathEscape(project),
+		PathEscape(fileName),
 	)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
@@ -323,8 +323,8 @@ func (s *RepositoryFilesService) UpdateFile(pid interface{}, fileName string, op
 	}
 	u := fmt.Sprintf(
 		"projects/%s/repository/files/%s",
-		pathEscape(project),
-		pathEscape(fileName),
+		PathEscape(project),
+		PathEscape(fileName),
 	)
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
@@ -365,8 +365,8 @@ func (s *RepositoryFilesService) DeleteFile(pid interface{}, fileName string, op
 	}
 	u := fmt.Sprintf(
 		"projects/%s/repository/files/%s",
-		pathEscape(project),
-		pathEscape(fileName),
+		PathEscape(project),
+		PathEscape(fileName),
 	)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, opt, options)
diff --git a/resource_label_events.go b/resource_label_events.go
index 2bc9389..37da156 100644
--- a/resource_label_events.go
+++ b/resource_label_events.go
@@ -76,7 +76,7 @@ func (s *ResourceLabelEventsService) ListIssueLabelEvents(pid interface{}, issue
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/resource_label_events", pathEscape(project), issue)
+	u := fmt.Sprintf("projects/%s/issues/%d/resource_label_events", PathEscape(project), issue)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -101,7 +101,7 @@ func (s *ResourceLabelEventsService) GetIssueLabelEvent(pid interface{}, issue i
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/resource_label_events/%d", pathEscape(project), issue, event)
+	u := fmt.Sprintf("projects/%s/issues/%d/resource_label_events/%d", PathEscape(project), issue, event)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -127,7 +127,7 @@ func (s *ResourceLabelEventsService) ListGroupEpicLabelEvents(gid interface{}, e
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics/%d/resource_label_events", pathEscape(group), epic)
+	u := fmt.Sprintf("groups/%s/epics/%d/resource_label_events", PathEscape(group), epic)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -152,7 +152,7 @@ func (s *ResourceLabelEventsService) GetGroupEpicLabelEvent(gid interface{}, epi
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/epics/%d/resource_label_events/%d", pathEscape(group), epic, event)
+	u := fmt.Sprintf("groups/%s/epics/%d/resource_label_events/%d", PathEscape(group), epic, event)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -178,7 +178,7 @@ func (s *ResourceLabelEventsService) ListMergeRequestsLabelEvents(pid interface{
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/resource_label_events", pathEscape(project), request)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/resource_label_events", PathEscape(project), request)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -203,7 +203,7 @@ func (s *ResourceLabelEventsService) GetMergeRequestLabelEvent(pid interface{},
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/resource_label_events/%d", pathEscape(project), request, event)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/resource_label_events/%d", PathEscape(project), request, event)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
diff --git a/resource_state_events.go b/resource_state_events.go
index 38f6d82..e73ef77 100644
--- a/resource_state_events.go
+++ b/resource_state_events.go
@@ -61,7 +61,7 @@ func (s *ResourceStateEventsService) ListIssueStateEvents(pid interface{}, issue
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/resource_state_events", pathEscape(project), issue)
+	u := fmt.Sprintf("projects/%s/issues/%d/resource_state_events", PathEscape(project), issue)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -86,7 +86,7 @@ func (s *ResourceStateEventsService) GetIssueStateEvent(pid interface{}, issue i
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/issues/%d/resource_state_events/%d", pathEscape(project), issue, event)
+	u := fmt.Sprintf("projects/%s/issues/%d/resource_state_events/%d", PathEscape(project), issue, event)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -112,7 +112,7 @@ func (s *ResourceStateEventsService) ListMergeStateEvents(pid interface{}, reque
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/resource_state_events", pathEscape(project), request)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/resource_state_events", PathEscape(project), request)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -137,7 +137,7 @@ func (s *ResourceStateEventsService) GetMergeRequestStateEvent(pid interface{},
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/merge_requests/%d/resource_state_events/%d", pathEscape(project), request, event)
+	u := fmt.Sprintf("projects/%s/merge_requests/%d/resource_state_events/%d", PathEscape(project), request, event)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
diff --git a/runners.go b/runners.go
index 98405fb..e906b1b 100644
--- a/runners.go
+++ b/runners.go
@@ -271,7 +271,7 @@ func (s *RunnersService) ListProjectRunners(pid interface{}, opt *ListProjectRun
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/runners", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/runners", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -305,7 +305,7 @@ func (s *RunnersService) EnableProjectRunner(pid interface{}, opt *EnableProject
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/runners", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/runners", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -330,7 +330,7 @@ func (s *RunnersService) DisableProjectRunner(pid interface{}, runner int, optio
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/runners/%d", pathEscape(project), runner)
+	u := fmt.Sprintf("projects/%s/runners/%d", PathEscape(project), runner)
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -362,7 +362,7 @@ func (s *RunnersService) ListGroupsRunners(gid interface{}, opt *ListGroupsRunne
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("groups/%s/runners", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/runners", PathEscape(group))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
diff --git a/search.go b/search.go
index 972a37d..86ff833 100644
--- a/search.go
+++ b/search.go
@@ -328,7 +328,7 @@ func (s *SearchService) searchByGroup(gid interface{}, scope, query string, resu
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("groups/%s/-/search", pathEscape(group))
+	u := fmt.Sprintf("groups/%s/-/search", PathEscape(group))
 
 	opts := &searchOptions{SearchOptions: *opt, Scope: scope, Search: query}
 
@@ -345,7 +345,7 @@ func (s *SearchService) searchByProject(pid interface{}, scope, query string, re
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/-/search", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/-/search", PathEscape(project))
 
 	opts := &searchOptions{SearchOptions: *opt, Scope: scope, Search: query}
 
diff --git a/services.go b/services.go
index 973a30c..67b221f 100644
--- a/services.go
+++ b/services.go
@@ -64,7 +64,7 @@ func (s *ServicesService) ListServices(pid interface{}, options ...RequestOption
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -108,7 +108,7 @@ func (s *ServicesService) GetCustomIssueTrackerService(pid interface{}, options
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/custom-issue-tracker", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/custom-issue-tracker", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -147,7 +147,7 @@ func (s *ServicesService) SetCustomIssueTrackerService(pid interface{}, opt *Set
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/custom-issue-tracker", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/custom-issue-tracker", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -166,7 +166,7 @@ func (s *ServicesService) DeleteCustomIssueTrackerService(pid interface{}, optio
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/custom-issue-tracker", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/custom-issue-tracker", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -204,7 +204,7 @@ func (s *ServicesService) GetDroneCIService(pid interface{}, options ...RequestO
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/drone-ci", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/drone-ci", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -240,7 +240,7 @@ func (s *ServicesService) SetDroneCIService(pid interface{}, opt *SetDroneCIServ
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/drone-ci", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/drone-ci", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -259,7 +259,7 @@ func (s *ServicesService) DeleteDroneCIService(pid interface{}, options ...Reque
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/drone-ci", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/drone-ci", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -295,7 +295,7 @@ func (s *ServicesService) GetExternalWikiService(pid interface{}, options ...Req
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/external-wiki", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/external-wiki", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -329,7 +329,7 @@ func (s *ServicesService) SetExternalWikiService(pid interface{}, opt *SetExtern
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/external-wiki", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/external-wiki", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -348,7 +348,7 @@ func (s *ServicesService) DeleteExternalWikiService(pid interface{}, options ...
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/external-wiki", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/external-wiki", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -385,7 +385,7 @@ func (s *ServicesService) GetGithubService(pid interface{}, options ...RequestOp
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/github", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/github", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -421,7 +421,7 @@ func (s *ServicesService) SetGithubService(pid interface{}, opt *SetGithubServic
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/github", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/github", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -440,7 +440,7 @@ func (s *ServicesService) DeleteGithubService(pid interface{}, options ...Reques
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/github", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/github", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -469,7 +469,7 @@ func (s *ServicesService) SetGitLabCIService(pid interface{}, opt *SetGitLabCISe
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/gitlab-ci", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/gitlab-ci", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -488,7 +488,7 @@ func (s *ServicesService) DeleteGitLabCIService(pid interface{}, options ...Requ
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/gitlab-ci", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/gitlab-ci", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -517,7 +517,7 @@ func (s *ServicesService) SetHipChatService(pid interface{}, opt *SetHipChatServ
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/hipchat", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/hipchat", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -536,7 +536,7 @@ func (s *ServicesService) DeleteHipChatService(pid interface{}, options ...Reque
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/hipchat", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/hipchat", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -574,7 +574,7 @@ func (s *ServicesService) GetJenkinsCIService(pid interface{}, options ...Reques
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/jenkins", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/jenkins", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -614,7 +614,7 @@ func (s *ServicesService) SetJenkinsCIService(pid interface{}, opt *SetJenkinsCI
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/jenkins", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/jenkins", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -633,7 +633,7 @@ func (s *ServicesService) DeleteJenkinsCIService(pid interface{}, options ...Req
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/jenkins", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/jenkins", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -704,7 +704,7 @@ func (s *ServicesService) GetJiraService(pid interface{}, options ...RequestOpti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/jira", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/jira", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -747,7 +747,7 @@ func (s *ServicesService) SetJiraService(pid interface{}, opt *SetJiraServiceOpt
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/jira", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/jira", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -766,7 +766,7 @@ func (s *ServicesService) DeleteJiraService(pid interface{}, options ...RequestO
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/jira", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/jira", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -815,7 +815,7 @@ func (s *ServicesService) GetMattermostService(pid interface{}, options ...Reque
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/mattermost", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/mattermost", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -871,7 +871,7 @@ func (s *ServicesService) SetMattermostService(pid interface{}, opt *SetMattermo
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/mattermost", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/mattermost", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -890,7 +890,7 @@ func (s *ServicesService) DeleteMattermostService(pid interface{}, options ...Re
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/mattermost", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/mattermost", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -936,7 +936,7 @@ func (s *ServicesService) GetMicrosoftTeamsService(pid interface{}, options ...R
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/microsoft-teams", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/microsoft-teams", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -981,7 +981,7 @@ func (s *ServicesService) SetMicrosoftTeamsService(pid interface{}, opt *SetMicr
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/microsoft-teams", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/microsoft-teams", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -999,7 +999,7 @@ func (s *ServicesService) DeleteMicrosoftTeamsService(pid interface{}, options .
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/microsoft-teams", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/microsoft-teams", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -1038,7 +1038,7 @@ func (s *ServicesService) GetPipelinesEmailService(pid interface{}, options ...R
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/pipelines-email", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/pipelines-email", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -1077,7 +1077,7 @@ func (s *ServicesService) SetPipelinesEmailService(pid interface{}, opt *SetPipe
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/pipelines-email", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/pipelines-email", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -1096,7 +1096,7 @@ func (s *ServicesService) DeletePipelinesEmailService(pid interface{}, options .
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/pipelines-email", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/pipelines-email", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -1134,7 +1134,7 @@ func (s *ServicesService) GetPrometheusService(pid interface{}, options ...Reque
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/prometheus", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/prometheus", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -1170,7 +1170,7 @@ func (s *ServicesService) SetPrometheusService(pid interface{}, opt *SetPromethe
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/prometheus", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/prometheus", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -1189,7 +1189,7 @@ func (s *ServicesService) DeletePrometheusService(pid interface{}, options ...Re
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/prometheus", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/prometheus", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -1240,7 +1240,7 @@ func (s *ServicesService) GetSlackService(pid interface{}, options ...RequestOpt
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/slack", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/slack", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -1302,7 +1302,7 @@ func (s *ServicesService) SetSlackService(pid interface{}, opt *SetSlackServiceO
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/slack", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/slack", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -1321,7 +1321,7 @@ func (s *ServicesService) DeleteSlackService(pid interface{}, options ...Request
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/slack", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/slack", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -1360,7 +1360,7 @@ func (s *ServicesService) GetYouTrackService(pid interface{}, options ...Request
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/youtrack", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/youtrack", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -1397,7 +1397,7 @@ func (s *ServicesService) SetYouTrackService(pid interface{}, opt *SetYouTrackSe
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/youtrack", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/youtrack", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -1416,7 +1416,7 @@ func (s *ServicesService) DeleteYouTrackService(pid interface{}, options ...Requ
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/services/youtrack", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/services/youtrack", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
diff --git a/tags.go b/tags.go
index e0eb3b1..7f2851d 100644
--- a/tags.go
+++ b/tags.go
@@ -73,7 +73,7 @@ func (s *TagsService) ListTags(pid interface{}, opt *ListTagsOptions, options ..
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/tags", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/repository/tags", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -99,7 +99,7 @@ func (s *TagsService) GetTag(pid interface{}, tag string, options ...RequestOpti
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/tags/%s", pathEscape(project), url.PathEscape(tag))
+	u := fmt.Sprintf("projects/%s/repository/tags/%s", PathEscape(project), url.PathEscape(tag))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -136,7 +136,7 @@ func (s *TagsService) CreateTag(pid interface{}, opt *CreateTagOptions, options
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/tags", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/repository/tags", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -161,7 +161,7 @@ func (s *TagsService) DeleteTag(pid interface{}, tag string, options ...RequestO
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/tags/%s", pathEscape(project), url.PathEscape(tag))
+	u := fmt.Sprintf("projects/%s/repository/tags/%s", PathEscape(project), url.PathEscape(tag))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {
@@ -193,7 +193,7 @@ func (s *TagsService) CreateReleaseNote(pid interface{}, tag string, opt *Create
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/tags/%s/release", pathEscape(project), url.PathEscape(tag))
+	u := fmt.Sprintf("projects/%s/repository/tags/%s/release", PathEscape(project), url.PathEscape(tag))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -228,7 +228,7 @@ func (s *TagsService) UpdateReleaseNote(pid interface{}, tag string, opt *Update
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/repository/tags/%s/release", pathEscape(project), url.PathEscape(tag))
+	u := fmt.Sprintf("projects/%s/repository/tags/%s/release", PathEscape(project), url.PathEscape(tag))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
diff --git a/time_stats.go b/time_stats.go
index dfbc1c8..74a4c38 100644
--- a/time_stats.go
+++ b/time_stats.go
@@ -59,7 +59,7 @@ func (s *timeStatsService) setTimeEstimate(pid interface{}, entity string, issue
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/%s/%d/time_estimate", pathEscape(project), entity, issue)
+	u := fmt.Sprintf("projects/%s/%s/%d/time_estimate", PathEscape(project), entity, issue)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -83,7 +83,7 @@ func (s *timeStatsService) resetTimeEstimate(pid interface{}, entity string, iss
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/%s/%d/reset_time_estimate", pathEscape(project), entity, issue)
+	u := fmt.Sprintf("projects/%s/%s/%d/reset_time_estimate", PathEscape(project), entity, issue)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -114,7 +114,7 @@ func (s *timeStatsService) addSpentTime(pid interface{}, entity string, issue in
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/%s/%d/add_spent_time", pathEscape(project), entity, issue)
+	u := fmt.Sprintf("projects/%s/%s/%d/add_spent_time", PathEscape(project), entity, issue)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -138,7 +138,7 @@ func (s *timeStatsService) resetSpentTime(pid interface{}, entity string, issue
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/%s/%d/reset_spent_time", pathEscape(project), entity, issue)
+	u := fmt.Sprintf("projects/%s/%s/%d/reset_spent_time", PathEscape(project), entity, issue)
 
 	req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
 	if err != nil {
@@ -162,7 +162,7 @@ func (s *timeStatsService) getTimeSpent(pid interface{}, entity string, issue in
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/%s/%d/time_stats", pathEscape(project), entity, issue)
+	u := fmt.Sprintf("projects/%s/%s/%d/time_stats", PathEscape(project), entity, issue)
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
diff --git a/validate.go b/validate.go
index d922d7c..75b0c75 100644
--- a/validate.go
+++ b/validate.go
@@ -91,7 +91,7 @@ func (s *ValidateService) ProjectNamespaceLint(pid interface{}, opt *ProjectName
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/ci/lint", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/ci/lint", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, &opt, options)
 	if err != nil {
@@ -124,7 +124,7 @@ func (s *ValidateService) ProjectLint(pid interface{}, opt *ProjectLintOptions,
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/ci/lint", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/ci/lint", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, &opt, options)
 	if err != nil {
diff --git a/wikis.go b/wikis.go
index 7437cc3..1139956 100644
--- a/wikis.go
+++ b/wikis.go
@@ -61,7 +61,7 @@ func (s *WikisService) ListWikis(pid interface{}, opt *ListWikisOptions, options
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/wikis", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/wikis", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
 	if err != nil {
@@ -86,7 +86,7 @@ func (s *WikisService) GetWikiPage(pid interface{}, slug string, options ...Requ
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/wikis/%s", pathEscape(project), url.PathEscape(slug))
+	u := fmt.Sprintf("projects/%s/wikis/%s", PathEscape(project), url.PathEscape(slug))
 
 	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
 	if err != nil {
@@ -122,7 +122,7 @@ func (s *WikisService) CreateWikiPage(pid interface{}, opt *CreateWikiPageOption
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/wikis", pathEscape(project))
+	u := fmt.Sprintf("projects/%s/wikis", PathEscape(project))
 
 	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
 	if err != nil {
@@ -158,7 +158,7 @@ func (s *WikisService) EditWikiPage(pid interface{}, slug string, opt *EditWikiP
 	if err != nil {
 		return nil, nil, err
 	}
-	u := fmt.Sprintf("projects/%s/wikis/%s", pathEscape(project), url.PathEscape(slug))
+	u := fmt.Sprintf("projects/%s/wikis/%s", PathEscape(project), url.PathEscape(slug))
 
 	req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
 	if err != nil {
@@ -183,7 +183,7 @@ func (s *WikisService) DeleteWikiPage(pid interface{}, slug string, options ...R
 	if err != nil {
 		return nil, err
 	}
-	u := fmt.Sprintf("projects/%s/wikis/%s", pathEscape(project), url.PathEscape(slug))
+	u := fmt.Sprintf("projects/%s/wikis/%s", PathEscape(project), url.PathEscape(slug))
 
 	req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
 	if err != nil {


Test patch:
diff --git a/gitlab_test.go b/gitlab_test.go
index c462d8b..666739f 100644
--- a/gitlab_test.go
+++ b/gitlab_test.go
@@ -199,3 +199,11 @@ func loadFixture(filePath string) []byte {
 
 	return content
 }
+
+func TestPathEscape(t *testing.T) {
+	want := "diaspora%2Fdiaspora"
+	got := PathEscape("diaspora/diaspora")
+	if want != got {
+		t.Errorf("Expected: %s, got %s", want, got)
+	}
+}