diff --git a/src/GitLabApiClient/BranchClient.cs b/src/GitLabApiClient/BranchClient.cs index 2746d61b..4ff936ac 100644 --- a/src/GitLabApiClient/BranchClient.cs +++ b/src/GitLabApiClient/BranchClient.cs @@ -4,6 +4,7 @@ using GitLabApiClient.Internal.Http; using GitLabApiClient.Internal.Paths; using GitLabApiClient.Internal.Queries; +using GitLabApiClient.Internal.Utilities; using GitLabApiClient.Models.Branches.Requests; using GitLabApiClient.Models.Branches.Responses; using GitLabApiClient.Models.Projects.Responses; @@ -62,7 +63,7 @@ public async Task CreateAsync(ProjectId projectId, CreateBranchRequest r /// The ID, path or of the project. /// The branch, you want deleted. public async Task DeleteBranch(ProjectId projectId, string branchName) => - await _httpFacade.Delete($"projects/{projectId}/repository/branches/{branchName}"); + await _httpFacade.Delete($"projects/{projectId}/repository/branches/{branchName.UrlEncode()}"); /// /// Deletes the merged branches