Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Schema Inaccuracy] Create a deployment branch not listing defaults & required.

Aperta
#3,841 4 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@nickfloyd ci sta già lavorando.

Dal 6/11/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

feature

Schema Inaccuracy

https://docs.github.com/en/rest/deployments/branch-policies?apiVersion=2022-11-28#create-a-deployment-branch-policy

Incorret request & response.

Expected

  • Description of the type parameter when absent to default to branch.
  • Response to list id, node_id, name and type as required so that they are not emitted as type | undefined in JS.

Reproduction Steps

Execute

gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  /repos/OWNER/REPO/environments/ENVIRONMENT_NAME/deployment-branch-policies \
   -f "name=release/*"

Yields

{
  "id": 20029356,
  "node_id": "MDE2OkdhdGVCcmFuY2hQb2xpY3kyMDAyOTM1Ng==",
  "name": "release/*",
  "type": "branch"
}

So omitting type creates a type = branch. Equally there is no way to create a deployment branch policy and not get back and id, node_id, name and a type.

Lingua principale
Nessun dato sulla lingua
Stelle
1.6k
Fork
342
Merge medio
2h 23m
PR unite (30g)
57

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/rest-api-description

Tutte le issue di github/rest-api-description

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.