ci: fix Argument list too long in triage workflows#26603
Merged
cocosheng-g merged 5 commits intomainfrom May 6, 2026
Merged
Conversation
Avoid loading large issue arrays into environment variables by using intermediate JSON files and the read_file tool.
Contributor
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
|
Size Change: -4 B (0%) Total Size: 34 MB
ℹ️ View Unchanged
|
Avoid loading large issue bodies into environment variables by using intermediate markdown files and the read_file tool. Also explicitly trust the workspace for the headless CLI.
gundermanc
approved these changes
May 6, 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
This PR fixes the
Argument list too longerror in both theGemini Scheduled Issue TriageandGemini Automated Issue Triageworkflows by avoiding passing massive JSON arrays and text (containing full issue bodies) into bash environment variables. It also resolves a trusted workspace error when running the CLI viarun-gemini-cliin a headless environment.Details
For
gemini-scheduled-issue-triage.yml:Find untriaged issuesandGet issue from eventsteps to output the JSON objects directly into files (no_area_issues.json,no_kind_issues.json, etc.) instead of saving them into bash variables.jqto merge and deduplicate the multiple JSON outputs into a singleissues_to_triage.jsonfile.read_filetool to the allowedcoreToolsarray in theRun Gemini Issue Analysisstep, and updated the prompt to instruct Gemini to read theissues_to_triage.jsonfile directly from the filesystem.For
gemini-automated-issue-triage.yml:Prepare Issue Datastep to write theISSUE_TITLEandISSUE_BODYto anissue_context.mdfile rather than passing them to the AI action as environment variables.read_filetool to thecoreToolsarray and updated the prompt to instruct the AI to read theissue_context.mdfile.For both workflows:
GEMINI_CLI_TRUST_WORKSPACE: 'true'to explicitly authorize the CLI to run securely inside the GitHub Actions environment.Related Issues
Closes #26602
How to Validate
📋 Gemini Scheduled Issue Triageor🏷️ Gemini Automated Issue Triageworkflow.fix-triage-workflow).Successful Verification Runs:
Pre-Merge Checklist