Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#14,371 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
cli

調査の方向性

pkg/cmd/pr/checks/aggregate.go の eliminateDuplicates から始め、既存の TestEliminateDuplicates のケースを読みます。issue で説明されている、完了した実行に続いて再実行がキューに入るシナリオを再現し、コマンドがキューに入った check を pending として報告し、以前の結論と終了コード 0 ではなく終了コード 8 になることを確認します。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Go
スター
46.3k
フォーク
9.1k
平均マージ
1日 7時間
マージ済み PR(30日)
76

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cli/cli のほかの issue

cli/cli の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。