[Schema Inaccuracy] Missing allow_auto_merge in repos/update request body on GHES
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 84/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- github, json
- Ambito
- api, documentation
Direzione di ricerca
Aggiorna gli schemi del corpo delle richieste PATCH in descriptions-next/ghes-3.17 fino a descriptions-next/ghes-3.21. Confronta lo schema fpt o ghec corrispondente e verifica ogni file GHES con jq, incluso il controllo della proprietà fornito. Il lavoro è completato quando ogni descrizione GHES elenca allow_auto_merge con il tipo booleano, la descrizione e il valore predefinito indicati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 1.6k
- Fork
- 342
- Merge medio
- 3h 33m
- PR unite (30g)
- 51
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/rest-api-description
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
github/rest-api-description#7201 ·
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
github/rest-api-description#7163 ·
-
Runner deprecations: registration_deprecates_at is declared on the response but never returned Apertafeature
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/rest-api-description#7162 ·
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/rest-api-description#7135 ·
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
github/rest-api-description#7111 · 1 commento ·
Tutte le issue di github/rest-api-description
Issue simili
-
area/sessions comp/cron comp/gateway P2 sweeper:risk-message-delivery sweeper:risk-session-state type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NousResearch/hermes-agent#118863 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
use-agent-os/agent-os#3312 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
needs-acceptance wg/data-plane-networking
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vllm-project/semantic-router#4024 · 1 commento ·