`gh stack view --json` omits the stack number that the text output prints
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
Direzione di ricerca
Inizia dal punto di ingresso gh stack view --json e confronta il suo payload con l’output leggibile dalle persone di gh stack view --short. La modifica è completa quando il JSON include l’identificatore dello stack come campo di primo livello number, mentre i campi esistenti branches, currentBranch e trunk rimangono disponibili; controlla i test esistenti del comando, se presenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
gh stack view prints the stack number in its human-readable output, but gh stack view --json omits it:
$ gh stack view --short
Stack #6
» stack-b-one ○ #4 (current)
...
$ gh stack view --json | jq 'keys'
[
"branches",
"currentBranch",
"trunk"
]
The per-branch objects carry pr.number, pr.url and pr.state, but the stack's own identifier is nowhere in the payload.
Why this matters
The stack number is the identifier gh stack checkout and gh stack link take, and the one shown in the GitHub stack UI — so it is the natural key for any automation. Because it is missing from the machine-readable output, scripts have to scrape it from gh stack submit's human-readable text (✓ Stack created on GitHub with 2 PRs (stack #6)) or from the UI.
Expected
Include the stack number as a top-level field in --json output, e.g. "number": 6, so --json is sufficient on its own.
Environment
gh2.97.0gh-stackv0.1.0- git 2.50.1
- macOS 26.4.1, darwin/arm64
- Lingua principale
- Go
- Stelle
- 1.5k
- Fork
- 73
- Merge medio
- 1g 8h
- PR unite (30g)
- 7
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/gh-stack
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
feature request topic: cli - general
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
feature request topic: auto-merge
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
bug topic: docs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
-
feature request topic: cli - push
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Tutte le issue di github/gh-stack
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
-
enhancement needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
kind/cleanup
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
sympozium-ai/sympozium#627 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100