[Schema Inaccuracy] 2026-03-10 pull_request webhook payloads are missing merge_commit_sha

未关闭 适合新手
#6,344 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
冷清
技术栈
github, openapi

调研方向

将 ghec.2026-03-10.json 和 api.github.com.2026-03-10.json 与 2022-11-28 模式进行比较,跟踪 webhook-pull-request-closed.pull_request 经过 pull-request-webhook。先从 pull-request 和 pull-request-webhook 的定义开始,然后验证在两个 2026-03-10 文件中,webhook-pull-request-closed.pull_request.merge_commit_sha 处存在 merge_commit_sha。

由索引模型根据 Issue 内容生成。

描述

documentation

Schema Inaccuracy

The 2026-03-10 spec files (ghec.2026-03-10.json and api.github.com.2026-03-10.json) remove merge_commit_sha from pull_request webhook payload schemas, but GitHub still delivers the field in live payloads — the webhook docs continue to list it as Required on pull_request payloads, and pull_request:closed consumers rely on it to determine which commit on the target branch a merged PR landed at.

Cause: webhook-pull-request-closed.pull_request is a $ref to pull-request-webhook, which is defined as:

"pull-request-webhook": {
  "allOf": [
    { "$ref": "#/components/schemas/pull-request" },
    { "type": "object", "properties": { ... } }
  ]
}

So removing merge_commit_sha from pull-request (a deliberate REST breaking change in 2026-03-10) transitively removes it from every webhook schema that references pull-request-webhook, even though the webhook contract has not changed.

Expected

merge_commit_sha should be present on pull_request webhook payloads in the 2026-03-10 spec files, matching the runtime webhook contract and the 2022-11-28 spec. The flagship case to verify any fix against is webhook-pull-request-closed.pull_request.merge_commit_sha.

Reproduction Steps

$ curl -s https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/ghec/ghec.2022-11-28.json \
    | jq '.components.schemas."pull-request".properties.merge_commit_sha'
{
  "type": "string",
  "example": "e5bd3914e2e596debea16f433f57875b5b90bcd6",
  "nullable": true
}

$ curl -s https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/ghec/ghec.2026-03-10.json \
    | jq '.components.schemas."pull-request".properties.merge_commit_sha'
null
主要语言
没有语言数据
星标
1.6k
派生
342
平均合并
3 小时 33 分钟
30 天内合并 PR
51

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/rest-api-description 的其他 Issue

查看 github/rest-api-description 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。