Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

get_job_logs with failed_only misses failed jobs after the first 30 jobs of a run

未關閉 適合新手
#3,428 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 4 天內回覆

@jayhemnani9910 已經在處理了。

開始於 2026年10月6日。

  • #3430 來自 @jayhemnani9910 —— 未關閉

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
74/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
go

研究方向

閱讀 pkg/github/actions.go 中的 handleFailedJobLogs,其中 ListWorkflowJobs 只被呼叫了一次且沒有傳 per_page;將其改為請求 per_page=100,並跟隨 NextPage 直到最後一頁,使 total_jobs 反映該 run 的完整作業數而非當前頁長度。在 pkg/github 中加入一個回歸測試,涵蓋作業超過一頁、失敗出現在前 30 個之後的 run(該 issue 引用 python/cpython 中的 run 31008458461 作為真實範例)。完成的標誌是:一個有 45 個作業、失敗在第 30 個作業之後的 run 能回傳這些失敗作業,並回傳 total_jobs: 45。

由索引模型根據 Issue 內容生成。

描述

Describe the bug

get_job_logs with failed_only: true lists the run's jobs with a single ListWorkflowJobs call and no per_page, so it only sees the API's default first page of 30 jobs. In a run with more jobs (a typical matrix build), a failure in job 31 or later is not found, and the tool answers "No failed jobs found in this workflow run". total_jobs in the result is also the page length (30), not the run's job count.

Affected version

v1.14.0 and main at 71ef8266 (handleFailedJobLogs in pkg/github/actions.go).

Steps to reproduce the behavior
  1. Run github-mcp-server stdio --read-only --toolsets=actions with a token.
  2. Call get_job_logs with {"owner":"python","repo":"cpython","run_id":31008458461,"failed_only":true}. That run has 45 jobs; its 2 failed jobs ("Docs / Check for removed HTML IDs / Check for removed HTML IDs" and "All required checks pass") are both after the first 30.
Expected vs actual behavior

Expected: logs (or log URLs) for the 2 failed jobs, with total_jobs: 45.

Actual (v1.14.0):

{"failed_jobs":0,"message":"No failed jobs found in this workflow run","run_id":31008458461,"total_jobs":30}

Only the first page of jobs is requested.

Logs

N/A

I have a small fix with a regression test ready and can open a PR: list the jobs with per_page=100 and follow NextPage until the last page.

主要語言
Go
星號
33.4k
分支
5.1k
平均合併
2 天 9 小時
30 天內合併 PR
34

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

github/github-mcp-server 的其他 Issue

查看 github/github-mcp-server 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。