Skip to content

Add a generic tool to fetch full GitHub Actions log text (not just run status) #781

Description

@proagentstore

Problem

Today two tools report GitHub Actions run outcomes: agent_deploy_status (for ProAgentStore-hosted agent repos) and the coder's github_workflow_runs. Both call the GitHub Actions runs API and return status, conclusion, branch and a URL. Confirmed by reading the source directly (workers/api/src/lib/github-actions.ts, workers/api/src/lib/connectors/github.ts, workers/mcp/src/index.ts) that neither one, nor anything else in the repo, fetches the actual job/step log TEXT. github_workflow_runs was deliberately scoped as a separate read rather than a generalisation of agent_deploy_status (see comment at workers/mcp/src/coding-tools.ts:553-560), and issue #683's original scope was run status only.

Ask

Add a new read-only tool (e.g. github_workflow_run_logs or similar) that, given a repo and a run id (or job id), fetches the actual log content for that run/job — not just metadata — so the coder and chat can diagnose a failing step without a human pasting log text in. This should be generic: available to any repo the calling instance already has GitHub read access to, not special-cased to one store.

Constraints to consider before implementing

  • GitHub's logs endpoint (GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs and the per-job variant) returns a redirect to a zip of plain-text log files, not JSON — different fetch/parsing shape than the existing workflow_runs handler.
  • Logs can be large; needs truncation/windowing similar to how repo_read_file already windows large files, rather than dumping the whole thing into a tool response.
  • Confirm the GitHub App installation token already used for github_workflow_runs has the scope needed for the logs endpoint (Actions: read) — may already be covered, but verify rather than assume.
  • Consider rate limits: log downloads are heavier than the runs-list call this reuses today.

Filed from a chat triage session after confirming via direct repo reads (not guessed) that this is a genuine gap, not an oversight in how an existing tool is being used.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions