github / github/gh-stack

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

Đang mở
#411 1 bình luận 2 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
1.5k
Fork
70
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
7

Mô tả

## 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with the implementation behind `gh stack push`, then trace how reordered stack ancestry and existing PR bases are handled. Reproduce the `gh stack modify`, `gh stack push`, and `gh stack submit` sequence from the report; done means push safely synchronizes the remote stack or clearly directs users to submit, without PRs being incorrectly marked as merged.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
github, go
Lĩnh vực
cli
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.