diff --git a/marge/batch_job.py b/marge/batch_job.py index 49af66ec..9c199914 100644 --- a/marge/batch_job.py +++ b/marge/batch_job.py @@ -199,12 +199,10 @@ def accept_mr( pipeline.cancel() if merge_request.force_remove_source_branch: + source_branch = quote(merge_request.source_branch, safe="") self._api.call( DELETE( - 'projects/{}/repository/branches/{}'.format( - merge_request.source_project_id, - quote(merge_request.source_branch, safe='') - ) + f'projects/{merge_request.source_project_id}/repository/branches/{source_branch}' ) )