Commit 6feed54
Categorize Code Quality "not enabled" upload failure as user-error
When a repository requests Code Quality analysis but it is not enabled,
the SARIF upload to `PUT /repos/:owner/:repo/code-quality/analysis`
returns a 403 with the message "Code quality is not enabled for this
repository...". `isEnablementError` did not recognize this wording, so
`wrapApiConfigurationError` left it as a plain Error and the analyze job
was reported with `status=failure` instead of `user-error`.
Add a `/Code Quality is not enabled/i` pattern so the error becomes a
ConfigurationError and `getActionsStatus` categorizes it as `user-error`.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 09dec6c commit 6feed54
3 files changed
Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| 314 | + | |
314 | 315 | | |
315 | 316 | | |
316 | 317 | | |
| |||
0 commit comments