Skip to content

Commit 1460c72

Browse files
committed
Explain and deprecate the merge_commit_sha
The merge_commit_sha is often misunderstood. It is internal GitHub plumbing that just happens to be part of the public API. Explain it (to reduce the confusion for the current version of the API), and announce plans to remove it from the next version of the API.
1 parent 5994f8f commit 1460c72

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

content/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ objects.
3939
* `[ ]` `master_branch` becomes `default_branch`.
4040
* `[ ]` `integrate_branch` on the [repo API](/v3/repos/#get) will no longer be
4141
returned.
42+
* `[ ]` `merge_commit_sha` on the [pull request API](/v3/pulls/#get-a-single-pull-request)
43+
will no longer be returned.
4244
* `[ ]` Use the `private` attribute when creating a private repository,
4345
instead of setting `public` to false.
4446
* `[ ]` Use JSON to POST to the "repos/:owner/:repo/forks" endpoint, instead of a query string.

content/v3/pulls.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ is `open`.
5555
<%= headers 200 %>
5656
<%= json :full_pull %>
5757

58+
### Mergability
59+
60+
Each time the pull request receives new commits, GitHub creates a merge commit
61+
to _test_ whether the pull request can be automatically merged into the base
62+
branch. (This _test_ commit is not added to the base branch or the head branch.)
63+
The Boolean `mergable` attribute indicates whether the pull request can be
64+
automatically merged. The `merge_commit_sha` attribute holds the SHA of the
65+
_test_ merge commit.
66+
5867
### Alternative Response Formats
5968

6069
Pass the appropriate [media type](/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.

0 commit comments

Comments
 (0)