github / github/gh-stack

Reordering a stack can cause PRs to be incorrectly marked as merged

Ouverte
#411 1 commentaire 2 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Go
Étoiles
1.5k
Forks
70
Merge moyen
1 j 8 h
PR mergées (30 j)
7

Description

## Problem

After reordering a published stack, I ran:

```bash
gh stack modify
gh stack push
gh stack submit
```

`gh stack push` updated the branch ancestry without updating the existing PR bases. Some PRs then targeted descendant branches that already contained their commits.

GitHub saw empty diffs and automatically marked those PRs as merged, although their commits were never merged into `main`. The PRs could not be reopened and had to be recreated with new branch names.

## Version

`gh stack version 0.0.8`

## Expected behavior

I expected `gh stack push` either
- to update the remote stack to match the reordered local stack,
- or to fail and tell me to use `gh stack submit` for this operation.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par l’implémentation derrière `gh stack push`, puis suivez la manière dont sont gérées l’ascendance des stacks réordonnés et les bases de PR existantes. Reproduisez la séquence `gh stack modify`, `gh stack push` et `gh stack submit` du rapport ; le travail est terminé lorsque push synchronise le stack distant en toute sécurité ou indique clairement aux utilisateurs de faire submit, sans que des PR soient incorrectement marquées comme merged.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
github, go
Domaine
cli
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.