-
Notifications
You must be signed in to change notification settings - Fork 378
Report which analysis kinds are enabled in status reports #3055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This will make it easier to replace in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
AnalysisKind
enum 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
StatusReportBase
for 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