Reduce Actions workflow list response payloads - #3047
Merged
Conversation
Return compact response types for workflow run and workflow job lists while retaining diagnostic, step, and runner metadata. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0eecbca7-7271-4a04-8d28-d952c27ed9c1
alirezainanlosalehi7-lgtm
approved these changes
Aug 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Reduces GitHub Actions list payload sizes while preserving fields needed for diagnostics and follow-up tool calls.
Changes:
- Adds minimal workflow-run, job, step, and response types.
- Converts Actions list responses to minimal representations.
- Adds conversion and handler-level tests.
Show a summary per file
| File | Description |
|---|---|
pkg/github/minimal_types.go |
Defines and converts minimal Actions response types. |
pkg/github/actions.go |
Returns minimal workflow run and job lists. |
pkg/github/actions_test.go |
Updates list-handler response tests. |
pkg/github/actions_minimal_test.go |
Tests field retention and payload trimming. |
Review details
Tip
Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
mattdholloway
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
list_workflow_runsandlist_workflow_jobs.Field contract
list_workflow_runsRetained top-level fields:
id,name,display_title,workflow_id,run_number,run_attempt,event,status,conclusion,head_branch,head_sha,path,html_url,created_at,updated_at,run_started_at.Dropped top-level fields:
node_id,check_suite_id,check_suite_node_id,url,jobs_url,logs_url,check_suite_url,artifacts_url,cancel_url,rerun_url,previous_attempt_url,workflow_url,repository,head_repository.pull_requestsnumberactor,triggering_actorlogin,id,profile_url(fromhtml_url),avatar_urlhead_commitmessagehead_sharemains top-level for commit/check lookup; the message preserves commit intent.referenced_workflowspath,sha,refThe list envelope remains
{ "total_count": ..., "workflow_runs": [...] }.list_workflow_jobsRetained job fields:
id,run_id,name,workflow_name,status,conclusion,head_branch,head_sha,html_url,run_attempt,runner_id,runner_name,runner_group_id,runner_group_name,labels,steps,created_at,started_at,completed_at.Dropped job fields:
run_url,node_id,url,check_run_url.Every job-step field remains:
name,status,conclusion,number,started_at, andcompleted_at. Runner and runner-group metadata is also retained for self-hosted-runner diagnosis.The existing outer jobs response envelope and nested
total_count/jobsresult are preserved.Why these fields are safe to remove from list responses
id, workflowworkflow_id/path, jobid, andhead_shapreserve the supported tool-chaining paths.repositoryandhead_repositoryduplicate the repository context supplied to the tool and can be retrieved separately when needed.head_sha.html_urlvalues remain, while repeated API endpoint URLs are removed.Measured response-size reduction
Measurements use minified JSON from representative fixtures containing nested repository data, actors, one pull request, a head commit, one referenced workflow, runner/group metadata, and two job steps. Actual savings vary with populated nested fields and the number of steps.
The job reduction is intentionally smaller because all step fields and all runner/group metadata remain available.
Testing
script/lintscript/testscript/generate-docs