Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Commit

Permalink
fix: properly delete branch by git reference (#139)
Browse files Browse the repository at this point in the history
* fix: properly delete branch by git reference

Fixes #138

* proper jsdoc comment
  • Loading branch information
alexander-fenster authored Sep 4, 2018
1 parent 291cd7c commit 7c8921a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7c8921a

Please sign in to comment.