[Schema Inaccuracy] Missing allow_auto_merge in repos/update request body on GHES
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- github, json
- Domain
- api, documentation
Research direction
Update the PATCH request-body schemas in descriptions-next/ghes-3.17 through descriptions-next/ghes-3.21. Compare the matching fpt or ghec schema and verify each GHES file with jq, including the provided property check. Done means every GHES description lists allow_auto_merge with the stated boolean type, description, and default.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- No language data
- Stars
- 1.6k
- Forks
- 342
- Avg merge
- 2h 23m
- Merged PRs (30d)
- 57
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/rest-api-description
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
github/rest-api-description#7220 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
github/rest-api-description#7201 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
github/rest-api-description#7163 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7162 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7135 ·
All issues in github/rest-api-description
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
canonical/paas-charm#368 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
area:workflow bug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fil-donadoni/tolaria#4409 ·
-
status/awaiting_triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100