From d1e1f81e0e0066b80d23f9e96edc15681bebbff5 Mon Sep 17 00:00:00 2001 From: nakultt Date: Wed, 28 Oct 2026 14:56:59 +0530 Subject: [PATCH 1/2] docs: Deprecate PullRequest.MergeCommitSHA GitHub REST API version 2026-03-10 removed merge_commit_sha from pull request responses. The field is kept for older API versions, GHES and webhook payloads. Updates #4077. --- github/pulls.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/pulls.go b/github/pulls.go index 3000b93e4c8..999d346f25c 100644 --- a/github/pulls.go +++ b/github/pulls.go @@ -73,7 +73,7 @@ type PullRequest struct { MergeableState *string `json:"mergeable_state,omitempty"` Rebaseable *bool `json:"rebaseable,omitempty"` MergedBy *User `json:"merged_by,omitempty"` - MergeCommitSHA *string `json:"merge_commit_sha,omitempty"` + MergeCommitSHA *string `json:"merge_commit_sha,omitempty"` // Deprecated: Removed from REST API responses in API version 2026-03-10. Comments *int `json:"comments,omitempty"` Commits *int `json:"commits,omitempty"` Additions *int `json:"additions,omitempty"` From 4ab1a9cc9cc0818fe901f6fd37d0dbb39b5ab73f Mon Sep 17 00:00:00 2001 From: nakultt Date: Wed, 28 Oct 2026 22:19:12 +0530 Subject: [PATCH 2/2] Address review comments --- github/pulls.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/pulls.go b/github/pulls.go index 999d346f25c..df1e313af6d 100644 --- a/github/pulls.go +++ b/github/pulls.go @@ -73,7 +73,7 @@ type PullRequest struct { MergeableState *string `json:"mergeable_state,omitempty"` Rebaseable *bool `json:"rebaseable,omitempty"` MergedBy *User `json:"merged_by,omitempty"` - MergeCommitSHA *string `json:"merge_commit_sha,omitempty"` // Deprecated: Removed from REST API responses in API version 2026-03-10. + MergeCommitSHA *string `json:"merge_commit_sha,omitempty"` // Deprecated: GitHub REST API version 2026-03-10 removes the MergeCommitSHA field. Comments *int `json:"comments,omitempty"` Commits *int `json:"commits,omitempty"` Additions *int `json:"additions,omitempty"`