diff --git a/src/lib/github.ts b/src/lib/github.ts index fca5741..d85df7e 100644 --- a/src/lib/github.ts +++ b/src/lib/github.ts @@ -202,11 +202,12 @@ export class GitHubRepository { /** * Deletes the given branch. - * @param {string} string Ref of the branch. + * @param {string} branch Name of the branch. */ - async deleteBranch(ref: string) { + async deleteBranch(branch: string) { const owner = this.repository.owner.login; const repo = this.repository.name; + const ref = `refs/heads/${branch}`; const result = await this.octokit.gitdata.deleteReference({owner, ref, repo}); return result.data;