[Schema Inaccuracy] Branch rule parameters `require_extra_approval_for_unattributed_changes`, `ignore_approvals_from_contributors` and `actor_controlled_merging` are missing
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- openapi
调研方向
先从 api.github.com.2022-11-28.json 中的 repository-rule-pull-request 和 repository-rule-merge-queue schema 开始,然后将它们与 2026-03-10 描述中的对应项进行比较。根据显示的 gh api 响应和 jq 属性列表验证参数;完成的标准是三个布尔字段都在两份描述中有所表示。
由索引模型根据 Issue 内容生成。
描述
Schema Inaccuracy
Branch rules and rulesets return rule parameters that the description doesn't list. The pull_request rule carries require_extra_approval_for_unattributed_changes and ignore_approvals_from_contributors, and the merge_queue rule carries actor_controlled_merging. None of the three is in repository-rule-pull-request or repository-rule-merge-queue in the 2022-11-28 or 2026-03-10 description on main (c6721f32). ignore_approvals_from_contributors only appears in the webhooks_rule schema for branch protection webhooks.
These schemas back GET /repos/{owner}/{repo}/rules/branches/{branch} and the repo and org ruleset endpoints, so clients generated from the description drop the three fields, and decoders that reject unknown fields fail on real responses.
Expected
repository-rule-pull-request.parameters lists require_extra_approval_for_unattributed_changes and ignore_approvals_from_contributors, and repository-rule-merge-queue.parameters lists actor_controlled_merging. All three come back as booleans.
Reproduction Steps
$ gh api -H "X-GitHub-Api-Version: 2022-11-28" repos/github/docs/rules/branches/main --jq '.[] | select(.type=="pull_request" or .type=="merge_queue") | {type, parameters}'
{"parameters":{"allowed_merge_methods":["merge","squash","rebase"],"dismiss_stale_reviews_on_push":true,"dismissal_restriction":{"allowed_actors":[],"enabled":false},"ignore_approvals_from_contributors":false,"require_code_owner_review":true,"require_extra_approval_for_unattributed_changes":true,"require_last_push_approval":false,"required_approving_review_count":1,"required_review_thread_resolution":false,"required_reviewers":[]},"type":"pull_request"}
{"parameters":{"actor_controlled_merging":false,"check_response_timeout_minutes":60,"grouping_strategy":"ALLGREEN","max_entries_to_build":2,"max_entries_to_merge":1,"merge_method":"SQUASH","min_entries_to_merge":1,"min_entries_to_merge_wait_minutes":5},"type":"merge_queue"}
$ jq -c '.components.schemas["repository-rule-pull-request"].properties.parameters.properties | keys' api.github.com.2022-11-28.json
["allowed_merge_methods","dismiss_stale_reviews_on_push","dismissal_restriction","require_code_owner_review","require_last_push_approval","required_approving_review_count","required_review_thread_resolution","required_reviewers"]
$ jq -c '.components.schemas["repository-rule-merge-queue"].properties.parameters.properties | keys' api.github.com.2022-11-28.json
["check_response_timeout_minutes","grouping_strategy","max_entries_to_build","max_entries_to_merge","merge_method","min_entries_to_merge","min_entries_to_merge_wait_minutes"]
GET /repos/{owner}/{repo}/rulesets/{ruleset_id} returns the same pull_request parameters.
- 主要语言
- 没有语言数据
- 星标
- 1.6k
- 派生
- 342
- 平均合并
- 7 小时 21 分钟
- 30 天内合并 PR
- 64
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/rest-api-description 的其他 Issue
-
feature
难度 2/5 1-3 小时 新手友好度 85/100
github/rest-api-description#7220 ·
维护者通常 1 天内回复
-
feature
难度 2/5 1-3 小时 新手友好度 82/100
github/rest-api-description#7201 ·
维护者通常 1 天内回复
-
feature
难度 2/5 1-3 小时 新手友好度 72/100
github/rest-api-description#7163 ·
维护者通常 1 天内回复
-
feature
难度 2/5 1-3 小时 新手友好度 68/100
github/rest-api-description#7162 ·
维护者通常 1 天内回复
-
feature
难度 2/5 1-3 小时 新手友好度 68/100
github/rest-api-description#7135 ·
维护者通常 1 天内回复
查看 github/rest-api-description 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
run-llama/llama_index#23278 ·
维护者通常 2 天内回复
-
from-review-extraction priority: low python severity:nit
难度 2/5 1-3 小时 新手友好度 90/100
LearningCircuit/local-deep-research#6944 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
iMicknl/python-overkiz-api#2263 ·
维护者通常 7 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
meshery/meshery#22119 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
sgl-project/sglang#41482 ·
维护者通常 1 天内回复