Feature request: support merge-based stack synchronization without force-pushing
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 35/100
Direção de pesquisa
Comece rastreando o workflow existente "Rebase stack" e o comando de sincronização do stack na CLI. Mapeie como as atualizações de branches, os Force-Pushes, os conflitos, as aprovações, os checks e as branches protegidas são tratados. O trabalho estará concluído quando um modo selecionável baseado em Merge sincronizar as branches na ordem do stack sem executar Force-Pushes, enquanto os stacks existentes baseados em Rebase continuarem funcionando.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Summary
Please add an option for stacked pull requests to synchronize branches using merge commits instead of rebasing and force-pushing branch history.
Motivation
Our organization does not allow force-pushes because they rewrite branch history and can make audit trails, approvals, and incident investigation more difficult. The current "Rebase stack" workflow is therefore incompatible with our repository policies.
Proposed behavior
Add a merge-based synchronization mode for stacks:
- When a parent branch changes, merge the parent into each child branch in stack order.
- Preserve existing commits and branch history.
- Do not force-push rewritten branch history.
- Keep the existing rebase behavior as the default or as a selectable repository/stack setting.
- Make the selected synchronization mode visible in the stack UI and CLI.
- Respect branch protection and merge-commit policies.
Example
Given:
main
└── feature-a
└── feature-b
When main advances, merge main into feature-a, then merge the updated feature-a into feature-b, instead of rebasing both branches and force-pushing them.
Acceptance criteria
- A stack can be configured to use merge-based synchronization.
- Synchronizing the stack does not require force-pushing any branch.
- Existing approvals and checks are handled consistently with the merge-based history.
- Conflicts are reported per branch and can be resolved through the normal workflow.
- The behavior works with protected branches that block force-pushes.
- Existing rebase-based stacks continue to work unchanged.
Related issues
- #268: Stacked PR cannot be merged into a merge-queue branch
- #442: gh stack sync pushed a stack branch's merge commit directly onto the trunk branch
- Linguagem predominante
- Go
- Estrelas
- 1.5k
- Forks
- 73
- Merge médio
- 1d 8h
- PRs com merge (30d)
- 5
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 2/5 1-3 horas Facilidade para iniciantes 85/100
-
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
Todas as issues de github/gh-stack
Issues semelhantes
-
nix: vendorHash is outdated Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
-
Bob Shell support Abertaenhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
santhosh-tekuri/jsonschema#276 ·