Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

A stacked pull request cannot use auto-merge

Đang mở
#504 0 bình luận 7 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

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

Hướng nghiên cứu

Bắt đầu với lệnh gh stack link và tái hiện việc bị từ chối bằng kịch bản hai lớp trong issue. Đọc cách xử lý auto-merge và liên kết stack cùng với các issue liên quan #174, #172, #502 và #503. Được xem là hoàn tất khi các pull request xếp chồng có thể giữ lại auto-merge, hoặc khi lệnh và bảng stack giải thích rõ tính không tương thích và yêu cầu enqueue thủ công.

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

Mô tả

Summary

gh stack link refuses a pull request that has auto-merge enabled, so adopting a stack costs a capability that an unstacked pull request keeps. Every layer then needs a person at the keyboard at the moment the layer below lands.

Evidence

Both pull requests approved and green. #101 had auto-merge enabled, so linking failed:

Checking existing stacks...
Looking up PRs for 2 branches...
✗ PR #101 cannot be added to a stack: it has auto-merge enabled

Turning auto-merge off let the link succeed.

This compounds the behaviour in #174. When the bottom layer merges, the layer above leaves the queue and GitHub rewrites its head, which restarts its required checks. Nothing puts it back. With auto-merge unavailable, only a person can, and only once the restarted checks finish. A stack of three with a 15-minute required check needs three waits and three manual enqueues to land one change.

Expected

A stacked pull request can use auto-merge, so each layer enqueues itself once its base merges and its checks pass.

If the two genuinely cannot coexist, say so where the user meets it: gh stack link should explain why auto-merge and stacks are exclusive, and the stack panel should say that each layer needs a manual enqueue.

Actual

gh stack link rejects the pull request with no explanation of the conflict, and offers no alternative.

Environment

  • gh 2.100.0, gh stack v0.0.8
  • Trunk protected by a merge queue, merge_method: REBASE
  • Two-layer stack, both pull requests approved with required checks passing

Reproduction

  1. Open two pull requests that stack on each other, both approved and green.
  2. Enable auto-merge on the bottom one.
  3. Run gh stack link <bottom> <top>.

Note on scope

This reports only what was observed: gh stack link rejects a pull request that already has auto-merge enabled. The reverse direction, enabling auto-merge on a pull request that is already stacked, was not tested, because the repository in question has allow_auto_merge: false set at the repository level for unrelated reasons.

Related

  • #174 — the layer above leaves the queue and is not put back, which is what makes the missing auto-merge costly
  • #172 — "'Merge stack' appears to enqueue only the bottom PR"
  • #502 — the merge queue rewrites a commit that needed no rewrite, which is what restarts the checks
  • #503 — the panel gives no sign that a manual enqueue is needed
Ngôn ngữ chính
Go
Star
1.5k
Fork
73
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
7

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

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/gh-stack

Tất cả issue của github/gh-stack

Issue tương tự

Thêm issue về Go

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.