`gh stack view --json` omits the stack number that the text output prints
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 72/100
Direção de pesquisa
Comece pelo ponto de entrada gh stack view --json e compare seu payload com a saída legível por humanos de gh stack view --short. A alteração estará concluída quando o JSON incluir o identificador do stack como um campo de nível superior number, enquanto os campos existentes branches, currentBranch e trunk continuarem disponíveis; verifique os testes existentes do comando, se houver.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Go
- Estrelas
- 1.5k
- Forks
- 73
- Merge médio
- 1d 8h
- PRs com merge (30d)
- 7
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de github/gh-stack
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
-
feature request topic: cli - general
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
feature request topic: auto-merge
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
bug topic: docs
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 68/100
-
feature request topic: cli - push
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Todas as issues de github/gh-stack
Issues semelhantes
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 84/100
-
enhancement needs triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
kind/cleanup
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
kubernetes-sigs/kueue#15947 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
sympozium-ai/sympozium#627 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100