Skip to content

Conversation

@smockle
Copy link
Collaborator

@smockle smockle commented Dec 4, 2025

This PR updates the “Set results output” step so data from previous steps is directly interpolated into the JS script, rather than passed via environment variables. This prevents “Argument list too long” errors (and resulting workflow failures).

Under the hood, actions/github-script was doing something like this:

FILINGS='/** A huge JSON blob **/' FIXINGS='/** A huge JSON blob **/' node tmp/script.js

Depending on the size of FILINGS and FIXINGS, this could exceed a system’s ARG_MAX (https://www.in-ulm.de/~mascheck/various/argmax/ is a good explainer).

After removing the environment variables, the argument list length is much shorter, so the error is avoided.

@smockle smockle requested a review from a team as a code owner December 4, 2025 13:42
Copilot finished reviewing on behalf of smockle December 4, 2025 13:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes "Argument list too long" errors in the GitHub Actions workflow by changing how data is passed to the actions/github-script action. Instead of passing JSON data via environment variables (which count against the system's ARG_MAX limit), the data is now directly interpolated into the JavaScript code.

Key Changes:

  • Modified the "Set results output" step to use direct JavaScript interpolation instead of environment variable passing
  • Removed the env section that was setting FILINGS and FIXINGS environment variables
  • Eliminated JSON.parse() calls since the JSON strings are now interpolated as JavaScript literals

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@smockle smockle merged commit db62980 into main Dec 4, 2025
11 checks passed
@smockle smockle deleted the smockle/no-env-vars branch December 4, 2025 15:19
@smockle smockle mentioned this pull request Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants