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

gh pr checks reports a re-queued check run with the previous run's conclusion and exits 0

Đang mở Phù hợp với người mới
#14,371 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Đánh giá

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

Hướng nghiên cứu

Bắt đầu tại pkg/cmd/pr/checks/aggregate.go ở eliminateDuplicates, sau đó đọc các trường hợp TestEliminateDuplicates hiện có. Tái hiện kịch bản lần chạy đã hoàn tất cùng với lần chạy lại được xếp hàng như mô tả trong issue và xác minh rằng lệnh báo check được xếp hàng là đang chờ xử lý với mã thoát 8 thay vì kết luận trước đó và mã thoát 0.

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

Mô tả

bug gh-pr priority-2
Describe the bug

gh pr checks reports a re-queued check run with the conclusion of the run it replaced, and exits 0, while the new run is still queued.

eliminateDuplicates in pkg/cmd/pr/checks/aggregate.go keeps the newest entry per check by sorting on StartedAt descending. A check run that has not started yet has no startedAt, so its StartedAt is the zero time, which sorts as the oldest entry. The completed run it supersedes wins the deduplication and its conclusion is reported.

Affected version

Built from trunk at 0d121e8c (2026-09-05); the logic is unchanged in the current release.

Steps to reproduce the behavior
  1. On a PR with a completed check run, re-run that check so a new run is queued but has not started.
  2. Run gh pr checks <pr> while the new run is queued.
  3. The old run's conclusion is shown and the command exits 0.
Expected vs actual behavior

Expected: the re-queued run is reported as pending and the command exits 8 (pending). Actual: the previous run's pass is shown and the exit code is 0.

Logs

A driver that feeds eliminateDuplicates a completed run and a queued re-run of the same check (queued run: startedAt unset) returns the completed run:

build pass
error: <nil>

With the queued entry ranked first (a stable sort that puts zero StartedAt values ahead, then newest first) the same input returns:

build pending
error: PendingError

A fix with that ordering and a table case in TestEliminateDuplicates is ready; happy to open the PR if this is labelled help wanted.

Ngôn ngữ chính
Go
Star
46.3k
Fork
9.1k
Merge trung bình
1 ngày 7 giờ
Pull request đã merge (30 ngày)
76

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 cli/cli

Tất cả issue của cli/cli

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.