submit marks existing draft PRs ready for review without --open, firing review requests
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 58/100
Hướng nghiên cứu
Bắt đầu bằng cách chạy bản tái hiện hai lượt đã được báo cáo với gh stack submit --auto và kiểm tra luồng cập nhật của lệnh submit, đặc biệt là nơi các pull request hiện có được xử lý. So sánh luồng đó với hành vi của --open và xác minh bằng gh pr view A --json isDraft; hoàn thành có nghĩa là các lần gửi lặp lại giữ nguyên các draft hiện có trừ khi truyền --open, với các bài kiểm thử bao quát hồi quy này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Environment
- gh 2.96.0 (2026-07-02), gh-stack v0.0.4, git 2.46.1, macOS 26.6
Summary
gh stack submit --auto marked two already-open draft PRs as ready for review, which fired review requests to five CODEOWNERS. I did not pass --open.
The help text is explicit that this should not happen:
New PRs are created as drafts by default. Use
--opento mark them as ready for review.
Repro
gh stack submit --auto # creates PR A and PR B as drafts
gh pr view A --json isDraft # => true, as documented
# ... make no change to the branches ...
gh stack submit --auto # second run, still no --open
gh pr view A --json isDraft # => false
Second run's output, which gives no indication it changed draft state:
Checking stack state...
Pushing to origin...
PR #A for branch-a is up to date
PR #B for branch-b is up to date
✓ Stack updated on GitHub with 2 PRs
✓ Pushed and synced 2 branches
The PR timeline confirms it:
<t> ready_for_review by=<me>
<t> review_requested by=<me> x5
Those timestamps match the second submit to the second. I made no other change in between, and did not touch the web UI.
Why it matters
Marking a PR ready is not a local operation. It notifies every CODEOWNER, and on a repo with required reviewers it moves the PR into other people's queues. Doing it on an update pass, from a flag whose documented meaning is "use auto-generated titles without prompting", is surprising in a way that cannot be undone: gh pr ready --undo restores draft state but the notifications have already gone out.
It also makes submit unusable as an idempotent "sync my stack" command, which is what its output implies it is when everything is already up to date.
Expected
submit should only change draft state when --open is passed. If the current behaviour is deliberate for update passes, the help text should say so, and the output should name the change instead of printing is up to date.
- 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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/gh-stack
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
feature request topic: cli - general
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
feature request topic: auto-merge
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
bug topic: docs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
Tất cả issue của github/gh-stack
Issue tương tự
-
textual definition
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
geneontology/go-ontology#32653 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
-
needs design
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Priority/High ready-for-agent Severity/Major Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100