Stack should be merged when merge commit is already pushed
- Langage dominant
- Go
- Étoiles
- 1.5k
- Forks
- 70
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 7
Description
## Reproduce step
Let's say you have this stacked PRs.
```
main <- PR#1 <- PR#2 <- PR#3
```
Now, you manually create merge commit and push it to the `main`.
```
prv_main <- PR#1 <- PR#2 <- PR#3
\---------------------+-------new_main
```
## Current Behavior
- `PR#1` is closed, because it's base is `main`, and GitHub automatically closes already merged PRs.
- `PR#2` and `PR#3` are **NOT closed**, because their bases aren't `main` (they point to previous PR's tip), so they still have diff remaining, and PR isn't closed.
## Expected Behavior
- All PRs should be closed.
## How to fix this
Stacked PR should check it's mergeability against the whole stack's base (e.g. `main` in this case).
Basically the whole point of stacked PR is that "your PR is pointing to another PR, but they are treated as pointing to base".
## Why this should be fixed
1. These PRs are shown as "open PRs" while they are already merged.
2. This will help 3rd-party integrations -- e.g. [bors](https://bors.tech/index.html) manually creates octopus merge commit of PRs and push it to main.
I know that you can manually `gh stack sync`, but I think this should be done automatically.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Suivez le point d’entrée existant `gh stack sync` et la logique qui détermine si les PRs empilées sont mergées. Comparez la gestion de leur base avec le scénario de merge commit poussé manuellement décrit ici. Le travail est terminé lorsque tous les PRs de la stack sont reconnus comme mergés et fermés lorsque la base de la stack contient leurs modifications.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- git, github, go
- Domaine
- cli, devtools
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- Active
- Clarté
- Plutôt claire
- Accessibilité débutants
- 58/100