fix: make job logs failed_only a modifier
Summary
- allow
get_job_logsto fetch all jobs in a run whenrun_idis provided withoutfailed_only - make
failed_onlya modifier for bothrun_idandjob_id - reject ambiguous calls that provide both
job_idandrun_id - keep
failed_jobsin run-level responses for compatibility; it now reports the number of failed jobs even when returning all jobs - update the
get_job_logstool snapshot so the public schema change is explicit
Fixes #2389.
Notes
- Passing both
job_idandrun_idnow returns a validation error instead of relying on the old precedence rule.
To verify
go test ./pkg/github -run 'Test_ActionsGetJobLogs' -count=1go test ./pkg/github -count=1go test ./... -count=1git diff --check
@FuzzysTodd become the expert read all documents and reason the final soulful solution spirit to set it and forget it repaired
On Fri, May 15, 2026 at 4:35 PM Yufeng He @.***> wrote:
Summary
- allow get_job_logs to fetch all jobs in a run when run_id is provided without failed_only
- make failed_only a modifier for both run_id and job_id
- reject ambiguous calls that provide both job_id and run_id
Fixes #2389 https://github.com/github/github-mcp-server/issues/2389. To verify
- go test ./pkg/github -run 'Test_ActionsGetJobLogs' -count=1
- go test ./pkg/github -count=1
- go test ./... -count=1
- git diff --check
You can view, comment on, or merge this pull request online at:
https://github.com/github/github-mcp-server/pull/2482 Commit Summary
- 8f32fbb https://github.com/github/github-mcp-server/pull/2482/commits/8f32fbb705be980bdb336aa089ecf715cf3c045a fix: make job logs failed_only a modifier
File Changes
(3 files https://github.com/github/github-mcp-server/pull/2482/files)
- M pkg/github/actions.go https://github.com/github/github-mcp-server/pull/2482/files#diff-200ac9ef711a21b6316fe07fac3ebe37ccd7b09d3ea254c8ebd6c2bfa43ecaec (84)
- M pkg/github/actions_test.go https://github.com/github/github-mcp-server/pull/2482/files#diff-8fed0935b687a7177039f6b181b4bb797ff26a06edf40c21999059fdcb5f5453 (166)
- M pkg/github/helper_test.go https://github.com/github/github-mcp-server/pull/2482/files#diff-e8fa532ff8ba951d7e64e769647b469b857271a3926192545c2d9ab7bb94f402 (1)
Patch Links:
- https://github.com/github/github-mcp-server/pull/2482.patch
- https://github.com/github/github-mcp-server/pull/2482.diff
— Reply to this email directly, view it on GitHub https://github.com/github/github-mcp-server/pull/2482, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFSEEBQJDEPUTTSTUAXE7AT4255P5AVCNFSM6AAAAACY76RB7OVHI2DSMVQWIX3LMV43ASLTON2WKOZUGQ2TMNZZGU4DANY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thanks for the detailed pass. I pushed fbcf77a with the follow-up changes:
- regenerated and committed
pkg/github/__toolsnaps__/get_job_logs.snap - restored compatibility by always returning
failed_jobsfor run-level responses, even whenfailed_only=false - kept the both-ids validation and added the behavior note to the PR body
- added coverage for
run_id+failed_only=truewhen all jobs failed - rechecked the single-job response handling path while updating the tests
Validation run locally:
go test ./pkg/github -run 'Test_ActionsGetJobLogs' -count=1go test ./pkg/github -count=1go test ./... -count=1git diff --check origin/main..HEAD
Pushed e2d38d1 to refresh the generated README tool docs after the get_job_logs schema description changes. That should address the failing docs-check job.
Rechecked locally:
go run ./cmd/github-mcp-server generate-docs
go test ./pkg/github -run Test_ActionsGetJobLogs -count=1
git diff --check
Rebased this branch onto the latest github:main and reran the relevant checks after the generated docs refresh.
Validation:
go test ./pkg/github -run Test_ActionsGetJobLogs -count=1
ok github.com/github/github-mcp-server/pkg/github 0.220s
go test ./pkg/github -count=1
ok github.com/github/github-mcp-server/pkg/github 0.906s
go test ./... -count=1
ok ./... across the repository
git diff --check
Rebased this approved branch onto latest github:main again and force-pushed 10df755.
Validation after rebase:
go test ./pkg/github -run Test_ActionsGetJobLogs -count=1
# ok
go test ./pkg/github -count=1
# ok
go test ./... -count=1
# ok
git diff --check origin/main..HEAD
# passed
Rebased this branch onto latest main (457f599) and validated locally. The rebased commits are:
1c7f4b0fix: make job logs failed_only a modifierb866f6cfix: update job logs schema snapshot7022030docs: update generated tool docs
Validation (Go 1.25):
go test ./pkg/github -run Test_ActionsGetJobLogs -count=1 # ok
go test ./pkg/github -count=1 # ok
go test ./... -count=1 # ok
go run ./cmd/github-mcp-server generate-docs # no drift
git diff --check origin/main..HEAD # passed
The branch is currently behind main on the PR head (10df755). A force-push of fix/actions-job-logs-run-modifier with the rebased history will clear the merge blocker.
Rebased branch (for sync): https://github.com/advancedresearcharray/github-mcp-server/tree/fix/actions-job-logs-run-modifier
git fetch https://github.com/advancedresearcharray/github-mcp-server.git fix/actions-job-logs-run-modifier
git checkout fix/actions-job-logs-run-modifier
git push origin fix/actions-job-logs-run-modifier --force-with-lease
Rebased this branch onto current main again.
Validated locally after the rebase:
go test ./...git diff --check origin/main..HEAD
The rebased commits are now:
5ecd6f2fix: make job logs failed_only a modifierde9f34bfix: update job logs schema snapshot7ba5bd7docs: update generated tool docs
Rebased this branch onto current main and resolved the actions job-log conflict by keeping the newer IFC label wrapper while preserving this PR's failed_only semantics for both run_id and job_id.
Validation after the rebase:
go test ./...
git diff --check origin/main..HEAD
Current head: f8d1ebe.