github / github/gh-stack

Incorrect "PR #5 remains open" remains open after git stack modify for a PR that is already closed

Ouverte
#453 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug topic: cli - modify
Langage dominant
Go
Étoiles
1.5k
Forks
70
Merge moyen
1 j 8 h
PR mergées (30 j)
7

Description

1. Use `gs submit` to create stack with depth 2. Let's say branch names `layer1` and `layer2`
2. I close the PR for `layer2` in the GitHub UI
3. I want to remove the stack locally, so I use `git stack modify`, press `x` to delete the layer, and then `Control+S` to save.

I get the following output
```
$ gs modify
✓ Dropped layer2 from stack

✓ Stack modified successfully
Dropped: layer 2(PR #53155 remains open — close with `gh pr close 53155`)

Run `gh stack submit` to push your changes and update the stack of PRs on GitHub
```

Now `gh` cli can clearly tell the PR is already closed, because when I try to close it:
```
$ gh pr close 53155
! Pull request repo#53155 (PR Title) is already closed
```

I think a fix will be doing a resync on the state from GitHub before showing this message.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par le flux d’enregistrement de `git stack modify`, y compris la sortie de `gs modify` qui signale qu’une couche supprimée est toujours ouverte. Vérifiez comment l’état de la PR GitHub est obtenu avant ce message ; terminé lorsqu’une PR déjà fermée sur GitHub n’est pas signalée comme ouverte après la suppression de la couche.

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

Évaluation

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

Recevez les nouvelles issues par e-mail

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