Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Schema Inaccuracy] inconsistent issue schemas in webhooks

未关闭
#6,448 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
openapi
领域
api

调研方向

从 descriptions/api.github.com/api.github.com.json 开始,比较 webhook-issues-milestoned、webhook-issues-unlocked、webhook-issues-untyped 和 webhook-issues-unpinned 中的 issue 字段。阅读相关 issue #4622 以了解上下文,然后确定被引用的 schema 和内联 schema 是否可以互换。完成标准是:issue webhook schema 具有明确一致的 issue 定义,或者在它们不可互换时记录差异。

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

描述

feature

Schema Inaccuracy

In the webhooks schema for issues, there are several different definitions for issue objects; #/components/schemas/webhooks_issue and #/components/schemas/webhooks_issue_2 are used on several webhook types related to issues. Furthermore, most of the issue webhooks define the issue object inline.

(I think that issue #4622 describes a similar problem.)

Expected

Why are there different types for an issue object? It's hard to tell from exploring the raw json of the types whether the issue object attached to each type of issue webhook is the same, or if there are important differences in the fields included. I'm writing code that processes webhooks, and if all issue webhooks had one consistent type for issues, the processing logic would be much simpler.

(Also, this problem is not limited to issues. Pull requests seem to also be inconsistently defined.)

Reproduction Steps

In the descriptions/api.github.com/api.github.com.json file, compare the following types:

  • webhook-issues-milestoned
    • contains an issue defined inline
  • webhook-issues-unlocked
    • contains an issue defined inline
  • webhook-issues-untyped
    • contains an issue of type #/components/schemas/webhooks_issue
  • webhook-issues-unpinned
    • contains an issue of type #/components/schemas/webhooks_issue_2

Are these types interchangeable? Again, it's very hard to tell, as these are huge json blobs. Are the inline definitions of issues (in the milestoned and unlocked webhooks) the same?

主要语言
没有语言数据
星标
1.6k
派生
345
平均合并
6 小时
30 天内合并 PR
82

环境准备

从这里开始

  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 摘要。