-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Description
Describe the feature or problem you’d like to solve
I'm trying to submit a ~200KB SARIF file to the upload SARIF endpoint.
Using gh involves constructing the entire payload as a command-line, and shells don't really approve of 200KB command-lines...
Proposed solution
Add some syntax to allow passing data via a file instead of expanded on a command line will allow users to use gh to submit large SARIF files (and probably other payloads) instead of resorting to curl.
(check-spelling is currently on the fence and uses gh some of the time and curl some of the time.)
Additional context
Trying to use gh fails miserably:
https://github.com/check-spelling-sandbox/terminal/actions/runs/12045375307/job/33583882502#step:2:14473
/home/runner/work/_temp/ed03237b-484a-4109-85ed-e2c9b2bc52a4.sh: line 11: /usr/bin/gh: Argument list too long
Using curl works:
https://github.com/check-spelling-sandbox/terminal/actions/runs/12046644392/job/33587535642#step:2:13835
curl -s -L
-X POST
-H "Accept: application/vnd.github+json"
-H "Authorization: ***"
-H "X-GitHub-Api-Version: 2022-11-28"
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/code-scanning/sarifs"
-d @"$sarif_payload" -o "$result"