github-mcp-server icon indicating copy to clipboard operation
github-mcp-server copied to clipboard

fix: make failed_only a modifier for job logs

Open jstar0 opened this issue 5 months ago • 0 comments

Summary

Fixes #2389.

get_job_logs currently treats failed_only as a mode switch, so run_id with failed_only=false errors instead of returning the run's job logs. This makes failed_only a modifier for either supported identifier.

Changes

  • Allow run_id to return logs for all jobs, with failed_only=true filtering that run to failed jobs.
  • Make job_id + failed_only=true check the job conclusion before fetching logs and return a tool error for non-failed jobs.
  • Reject ambiguous job_id + run_id input and missing-ID input before making GitHub API calls.
  • Update the generated tool documentation for the new parameter semantics.

Verification

go test ./pkg/github -run 'Test_ActionsGetJobLogs' -count=1 -v
go test ./pkg/github -count=1
go test ./...

I also ran script/generate-docs to refresh the generated README tool documentation.

jstar0 avatar Jun 11 '26 19:06 jstar0