github-mcp-server
github-mcp-server copied to clipboard
fix: make failed_only a modifier for job logs
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_idto return logs for all jobs, withfailed_only=truefiltering that run to failed jobs. - Make
job_id + failed_only=truecheck the job conclusion before fetching logs and return a tool error for non-failed jobs. - Reject ambiguous
job_id + run_idinput 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.