Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new CodeQL stub silently ignores supplied version-check overrides.
1 open issue
1 file not reviewed
lib/entry-points.js: Excluded by your content exclusion settings
What changed in this PR
Refactors shared helpers out of util.ts to reduce coupling and dependency cycles in the CodeQL Action.
Changes:
- Extracts error helpers and GitHub types into focused modules.
- Moves environment initialization onto
Env. - Moves CLI version comparison onto
CodeQLand updates callers and tests.
| File | Description |
|---|---|
| src/util.ts | Removes relocated helpers and preserves compatibility exports. |
| src/upload-sarif-action.ts | Initializes the action environment through Env. |
| src/upload-lib.test.ts | Updates environment initialization. |
| src/tools-download.test.ts | Spies on the relocated error helper. |
| src/setup/repository.ts | Imports InstanceURL from its owning module. |
| src/setup/repository.test.ts | Updates environment initialization. |
| src/setup-codeql.test.ts | Updates environment initialization. |
| src/setup-codeql-action.ts | Initializes through the action environment. |
| src/init-action.ts | Uses the new initialization and version methods. |
| src/github.ts | Houses GitHub variant and version types. |
| src/feature-flags/offline-features.test.ts | Updates environment initialization. |
| src/feature-flags.ts | Uses the CodeQL version method. |
| src/feature-flags.test.ts | Updates environment initialization. |
| src/errors/index.ts | Centralizes error helpers and classes. |
| src/environment.ts | Adds initialization and simplifies environment types. |
| src/database-upload.test.ts | Updates environment initialization. |
| src/config-utils.ts | Uses the CodeQL version method. |
| src/codeql.ts | Adds version comparison and stub wiring. |
| src/codeql.test.ts | Updates environment initialization. |
| src/autobuild-action.ts | Passes the environment into status reporting. |
| src/api-client.test.ts | Updates environment initialization. |
| src/analyze-action.ts | Initializes through the action environment. |
| src/actions-util.test.ts | Tests initialization through Env. |
Review effort: Max
| })), | ||
| isVersionAtLeast: resolveFunction( | ||
| partialCodeql, | ||
| "codeQlVersionAtLeast", |
This branch has not been deployed
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.

Groundwork for other things. This is a pure refactoring PR that moves various things out of
util.tsbecauseutil.tsis large and unfocused, and easily creates dependency cycles for other files that depend on it.