Make "init not called" a configuration error#3050
Merged
henrymercer merged 1 commit intomainfrom Aug 20, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR changes the error type for "init not called" scenarios from a generic Error to a more specific ConfigurationError. This affects three action files that check if the config file exists before proceeding.
- Updates error handling to use
ConfigurationErrorinstead of genericErrorfor better error categorization - Adds necessary imports for
ConfigurationErrorin the affected TypeScript files - Maintains the same error message to preserve existing behavior
Reviewed Changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/resolve-environment-action.ts | Imports ConfigurationError and uses it for config not found error |
| src/autobuild-action.ts | Imports ConfigurationError and uses it for config not found error |
| src/analyze-action.ts | Uses util.ConfigurationError for config not found error |
| lib/resolve-environment-action.js | Generated JavaScript code reflecting TypeScript changes |
| lib/autobuild-action.js | Generated JavaScript code reflecting TypeScript changes |
| lib/analyze-action.js | Generated JavaScript code reflecting TypeScript changes |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
mbg
approved these changes
Aug 20, 2025
Member
mbg
left a comment
There was a problem hiding this comment.
LGTM. Would it make sense to add this logic to a wrapper around getConfig? E.g. getRequiredConfig or something, since it's re-used in a few places?
Contributor
Author
|
Agreed, but I'll leave that as future work. |
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 error happens when
analyze,autobuild, orresolve-environmentis called beforeinit.Risk assessment
For internal use only. Please select the risk level of this change:
Merge / deployment checklist