diff --git a/src/backends/github/API.js b/src/backends/github/API.js index 1f0e87d4..8be0b043 100644 --- a/src/backends/github/API.js +++ b/src/backends/github/API.js @@ -331,20 +331,20 @@ export default class API { } patchRef(type, name, sha) { - return this.request(`${ this.repoURL }/git/refs/${ type }/${ name }`, { + return this.request(`${ this.repoURL }/git/refs/${ type }/${ encodeURIComponent(name) }`, { method: "PATCH", body: JSON.stringify({ sha }), }); } deleteRef(type, name, sha) { - return this.request(`${ this.repoURL }/git/refs/${ type }/${ name }`, { + return this.request(`${ this.repoURL }/git/refs/${ type }/${ encodeURIComponent(name) }`, { method: "DELETE", }); } getBranch(branch = this.branch) { - return this.request(`${ this.repoURL }/branches/${ branch }`); + return this.request(`${ this.repoURL }/branches/${ encodeURIComponent(branch) }`); } createBranch(branchName, sha) {