From 7c8921a603ada9d44ec94147875051aeb5287f43 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 4 Sep 2018 14:02:35 -0700 Subject: [PATCH] fix: properly delete branch by git reference (#139) * fix: properly delete branch by git reference Fixes #138 * proper jsdoc comment --- src/lib/github.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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;