[Schema Inaccuracy] Missing allow_auto_merge in repos/update request body on GHES
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 84/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- github, json
- Lĩnh vực
- api, documentation
Hướng nghiên cứu
Cập nhật các schema request-body của PATCH trong descriptions-next/ghes-3.17 đến descriptions-next/ghes-3.21. So sánh schema fpt hoặc ghec tương ứng và xác minh từng tệp GHES bằng jq, bao gồm cả kiểm tra thuộc tính được cung cấp. Được coi là hoàn thành khi mọi mô tả GHES đều liệt kê allow_auto_merge với kiểu boolean, mô tả và giá trị mặc định đã nêu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Schema Inaccuracy
This is the API
#/paths/~1repos~1{owner}~1{repo}/patch
The request body schema
#/paths/~1repos~1{owner}~1{repo}/patch/requestBody/content/application~1json/schema
is missing the allow_auto_merge property on every GHES description. It is present on fpt and ghec, but absent from ghes-3.17 through ghes-3.21.
GHES does accept the field. Two things in the same GHES descriptions already imply it:
#/paths/~1orgs~1{org}~1repos/post/requestBody/content/application~1json/schema/properties/allow_auto_merge— you can set it at repository creation.#/components/schemas/full-repository/properties/allow_auto_merge— it is reported back on reads, including in the200response of this veryPATCH.
So a repository can be created with auto-merge enabled and its current value can be read, but per the description there is no documented way to change it afterwards. The GHES web documentation for "Update a repository" does list allow_auto_merge as a body parameter, e.g. https://docs.github.com/en/enterprise-server@3.18/rest/repos/repos#update-a-repository
Expected
allow_auto_merge is present in the PATCH /repos/{owner}/{repo} request body schema for the GHES descriptions, matching fpt and ghec:
"allow_auto_merge": {
"type": "boolean",
"description": "Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge.",
"default": false
}
Reproduction Steps
With GH CLI, run this against GHES. The response shows "allowAutoMerge": true, i.e. the undocumented field took effect.
gh api --method PATCH /repos/OWNER/REPO -F allow_auto_merge=true --jq .allow_auto_merge
To confirm the gap in the description itself:
jq '.paths["/repos/{owner}/{repo}"].patch.requestBody.content["application/json"].schema.properties | has("allow_auto_merge")' \
descriptions-next/ghes-3.21/ghes-3.21.2022-11-28.json
# false
jq '.paths["/repos/{owner}/{repo}"].patch.requestBody.content["application/json"].schema.properties | has("allow_auto_merge")' \
descriptions-next/ghec/ghec.2022-11-28.json
# true
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 1.6k
- Fork
- 342
- Merge trung bình
- 3 giờ 33 phút
- Pull request đã merge (30 ngày)
- 51
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/rest-api-description
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
github/rest-api-description#7201 ·
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/rest-api-description#7163 ·
-
Runner deprecations: registration_deprecates_at is declared on the response but never returned Đang mởfeature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/rest-api-description#7162 ·
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/rest-api-description#7135 ·
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
github/rest-api-description#7111 · 1 bình luận ·
Tất cả issue của github/rest-api-description
Issue tương tự
-
has_tail_capacity wraps and get_writable_raw_unchecked commits raw_len before the bounds check Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
stratum-mining/stratum#2404 ·
-
opensubtitlescom: moviehash never sent when opensubtitles (.org) is not in the provider list Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Diaoul/subliminal#1382 ·
-
fix(errors): EHOSTUNREACH from a happy-eyeballs connect is reported as a resolver error (STAMP-80) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
snapshot-labs/stamp#666 ·
-
fix(api): prevent leaderboard SSE heartbeat from starting after disconnect during initial load Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
GauravKarakoti/SecureFlow#1070 · 1 bình luận ·
-
triage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
agentscope-ai/agentscope#2775 ·