| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Adds a check to skip SARIF upload for failed runs when code-quality is the only enabled analysis kind, since code-quality doesn't involve Code Scanning.
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/init-action-post-helper.ts | Added check to skip failed SARIF upload when code-quality is the only analysis kind |
| src/init-action-post-helper.test.ts | Updated test infrastructure and added test case for the new skip behavior |
| lib/init-action-post.js | Generated JavaScript code reflecting the TypeScript changes |
Sorry, something went wrong.
| // If the only enabled analysis kind is `code-quality`, then we shouldn't | ||
| // upload the failed SARIF to Code Scanning. | ||
| if (!isCodeScanningEnabled(config)) { | ||
| return { | ||
| upload_failed_run_skipped_because: | ||
| "Code Quality is the only enabled analysis kind.", |
There was a problem hiding this comment.
| // If the only enabled analysis kind is `code-quality`, then we shouldn't | |
| // upload the failed SARIF to Code Scanning. | |
| if (!isCodeScanningEnabled(config)) { | |
| return { | |
| upload_failed_run_skipped_because: | |
| "Code Quality is the only enabled analysis kind.", | |
| // Code scanning is the only analysis kind that makes use of failed SARIF uploads. | |
| if (!isCodeScanningEnabled(config)) { | |
| return { | |
| upload_failed_run_skipped_because: | |
| "The code scanning analysis kind is not enabled.", |
Sorry, something went wrong.
| }); | ||
| t.is( | ||
| result.upload_failed_run_skipped_because, | ||
| "Code Quality is the only enabled analysis kind.", |
There was a problem hiding this comment.
| "Code Quality is the only enabled analysis kind.", | |
| "The code scanning analysis kind is not enabled.", |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
In the init-post action, we upload a SARIF file to Code Scanning if the analyze step did not complete successfully. This doesn't make sense if analysis-kinds: code-quality, since that does not involve Code Scanning.
This PR adds a check to see if code-quality is the only enabled analysis kind and skips the upload if so.
Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
How did/will you validate this change?
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Merge / deployment checklist