Skip to content

Commit

Permalink
refactor: remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
korthout committed Dec 2, 2023
1 parent 2d809b5 commit 848d751
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,21 +220,6 @@ export class Github implements GithubApi {
return assoc_pr_data.some((pr) => pr.number == pull.number);
}

/**
* Retrieves the merge commit SHA and its parents for a given pull request.
* @param pull The pull request object.
* @returns An object containing the merge commit SHA and its parents, or null if the merge commit is not found.
*/
public async getMergeCommitShaAndParents(pull: PullRequest) {
const merge_commit_sha = await this.getMergeCommitSha(pull);
if (!merge_commit_sha) {
console.log("likely not merged yet.");
return null;
}
const parents = await this.getParents(merge_commit_sha);
return { merge_commit_sha, parents };
}

/**
* Checks if a commit is a merge commit.
* @param parents - An array of parent commit hashes.
Expand Down

0 comments on commit 848d751

Please sign in to comment.