Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

[Schema Inaccuracy] Branch rule parameters `require_extra_approval_for_unattributed_changes`, `ignore_approvals_from_contributors` and `actor_controlled_merging` are missing

未關閉 適合新手
#7,246 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 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 小時 29 分鐘
30 天內合併 PR
62

環境準備

從這裡開始

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