Make analysis kinds available for starting status report#3211
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR changes the init action to process the analysis-kinds input before sending the starting status report, allowing the analysis kinds information to be included in that report.
Key Changes
- The
analysis-kindsinput is now parsed earlier in the init process before the starting status report is sent - A new
initAnalysisKindsfunction centralizes the parsing of analysis kinds and handling of the deprecatedquality-queriesinput - The
initConfigfunction's interface is updated to accept pre-parsed analysis kinds instead of raw input strings
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/init-action.ts | Extracts status report sending to a helper function and moves analysis kinds initialization before the starting status report |
| src/config-utils.ts | Updates interface to accept parsed analysis kinds instead of raw input string, removes inline parsing logic |
| src/config-utils.test.ts | Updates test helper to use parsed analysis kinds array instead of input string |
| src/analyses.ts | Adds new initAnalysisKinds function that consolidates analysis kinds parsing and deprecated input handling |
| src/analyses.test.ts | Adds comprehensive test coverage for the new initAnalysisKinds function |
| lib/init-action.js | Generated JavaScript reflecting the TypeScript changes |
henrymercer
previously approved these changes
Oct 17, 2025
Contributor
henrymercer
left a comment
There was a problem hiding this comment.
Your alternative suggestion of ignoring the exception and then re-running initAnalysisKinds at the normal time seems more robust, but given that incorrect analysis kinds should be pretty rare, this seems OK too.
…uring the first call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the
initaction so that theanalysis-kindsinput is processed before thestartingstatus report is sent. This allows us to include information about the enabled analysis kinds in that report.One aspect of this that we may want to think about is that, if the
analysis-kindsinput is invalid, we now throw aConfigurationErrorfor that before thestartingreport is sent. This will still get caught and result in auser-errorstatus report, but without a matchingstartingstatus report.Alternatives:
ConfigurationErrors thrown byinitAnalysisKindsand re-throw them after thestartingstatus report has been sent to maintain the normal order of operations.initAnalysisKindsat the normal time.Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
analysis-kinds: code-scanning).analysis-kinds: code-quality).How did/will you validate this change?
.test.tsfiles).pr-checks).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