Make "init not called" a configuration error by henrymercer · Pull Request #3050 · github/codeql-action

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 ConfigurationError instead of generic Error for better error categorization
  • Adds necessary imports for ConfigurationError in 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.