github-community-projects / github-community-projects/safe-settings
The `checks` api has a limit of `65535` characters and a larger payload would trigger an error
- Dominant language
- JavaScript
- Stars
- 921
- Forks
- 226
- Avg merge
- 18h 3m
- Merged PRs (30d)
- 14
Description
## Problem Description
When running the checks for changes to `settings.yml` or `.yml` it is possible that the number of changes could be very large since these could be applied across 1000s of repos. This results in an error and the check run does not complete.
### What is actually happening
The `checks` api has a limit of `65535` characters and a larger payload would trigger an error like this:
```
"type":"Error","msg":"Invalid request.\n\nOnly 65535 characters are allowed; 394226 were supplied."
```
### What is the expected behavior
1. Better exception handling and any uncaught exception should be reported but the `checkrun` should complete.
2. If the number of changes are beyond a certain limit, only report upto the maximum allowed and indicate in the message that there are more than `n` number of changes and only `n` changes are being reported.
### Error output, if available
```
"stack":"HttpError: Invalid request.\n\nOnly 65535 characters are allowed; 394226 were supplied.\n at /.../node_modules/@octokit/request/dist-node/index.js:86:21\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async sendRequestWithRetries (/.../node_modules/@octokit/auth-app/dist-node/index.js:466:12)\n at async Job.doExecute (/.../node_modules/bottleneck/light.js:405:18)","type":"Error","msg":"Invalid request.\n\nOnly 65535 characters are allowed; 394226 were supplied."}
```
```
```
## Context
### Are you using the hosted instance of probot/settings or running your own?
On my own
### If running your own instance, are you using it with github.com or GitHub Enterprise?
github.com
#### Version of probot/settings
-
#### Version of GitHub Enterprise
Contributor guide
Assessment
This issue has not been assessed yet.