GitHub API error when comment exceeds max limit of characters allowed
Open
Nobody has claimed this yet.
upstream
- Dominant language
- JavaScript
- Stars
- 141
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
We have a repo that is receiving the following error from the cves command:
422 Validation Failed [{Resource:IssueComment Field:data Code:unprocessable Message:Body is too long (maximum is 65536 characters)}]
I understand that this is a limitation of the GitHub API, but could the Action handle the error more gracefully? A couple of options could include:
- separating out the report across multiple comments
- truncating the report with a note that the results have been truncated
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the cves command's GitHub API comment creation and reproduce the 65,536-character validation failure with an oversized report. Review the available handling options in the issue, then verify that the report is either split across comments or truncated with a clear note and that the API error no longer escapes unhandled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, github-actions, javascript
- Domain
- ci-cd, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100