Report which analysis kinds are enabled in status reports#3055
Conversation
This will make it easier to replace in the future
There was a problem hiding this comment.
Pull Request Overview
This PR adds reporting of enabled analysis types (code-scanning, code-quality) to status reports by introducing a new analyses field that contains a comma-separated list of active analysis kinds.
- Introduces an
AnalysisKindenum to standardize analysis type names - Adds logic to detect when code quality analysis is enabled through a new helper function
- Updates status reports to include the comma-separated list of enabled analyses
Reviewed Changes
Copilot reviewed 10 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/analyses.ts | New enum defining analysis kind constants (code-scanning, code-quality) |
| src/config-utils.ts | Adds isCodeQualityEnabled helper function to check if quality queries are configured |
| src/status-report.ts | Adds analyses field to status reports and logic to populate it based on config |
| src/analyze.ts | Refactors to use the new isCodeQualityEnabled helper instead of direct property checks |
| src/analyze-action.ts | Updates to use the new isCodeQualityEnabled helper function |
| lib/* | Generated JavaScript files corresponding to the TypeScript changes |
henrymercer
left a comment
There was a problem hiding this comment.
Looks good. My only question is would we rather wait for the analysis_kinds input so we can be more sure about when code scanning is enabled or not?
| /** | ||
| * Returns `true` if Code Quality analysis is enabled, or `false` if not. | ||
| */ | ||
| export function isCodeQualityEnabled(config: Config): config is Config & { |
There was a problem hiding this comment.
This could in future reference an analysis-kinds input.
I think I am happy to merge this as-is (once I have made the other necessary backend changes), since it should be accurate for the current setup. I can then iterate on the details as we move forward and update this accordingly. That's also why I added the |
This adds a new field to
StatusReportBasefor a comma-separated list of analysis names that are active.Risk assessment
For internal use only. Please select the risk level of this change:
Merge / deployment checklist