github-api icon indicating copy to clipboard operation
github-api copied to clipboard

Issues with getMergeCommitSha

Open BradPlayerZero opened this issue 9 months ago • 1 comments

Two fixes needed for getMergeCommitSha:

/**
 * See <a href="https://developer.github.com/changes/2013-04-25-deprecating-merge-commit-sha">GitHub blog post</a>
 *
 * @return the merge commit sha
 * @throws IOException
 *             the io exception
 */
public String getMergeCommitSha() throws IOException {
    populate();
    return merge_commit_sha;
}

First, GitHub has reversed themselves on deprecating merge_commit_id, so the comment should be removed.

Second, merge_commit_id is part of the list pull request API (get /repos/{owner}/{repo}/pulls), and required, so it should not call populate().

BradPlayerZero avatar Mar 15 '25 21:03 BradPlayerZero

PRs welcome. The field is probably missing from another API result.

bitwiseman avatar Mar 15 '25 21:03 bitwiseman