Skip to content

Conversation

@aadarsh-st
Copy link
Collaborator

No description provided.

@github-actions
Copy link

Gitleaks Findings: No secrets detected. Safe to proceed!

@aadarsh-st aadarsh-st changed the base branch from main to release/26.1.4 January 23, 2026 08:34
@github-actions
Copy link

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

Copy link

Copilot AI left a 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 refactors the codebase by replacing hardcoded string values with named constants to improve maintainability and reduce magic strings. The changes introduce new constant objects (SDK, SKYFLOW, CONFIG, HTTP_STATUS_CODE, CONTENT_TYPE, HTTP_HEADER, DETECT_STATUS, FILE_EXTENSION, FILE_FORMAT_TYPE, FILE_PROCESSING, ENCODING_TYPE, JWT, API_KEY, URL_PROTOCOL, BOOLEAN_STRING) and updates all references throughout the codebase to use these constants.

Changes:

  • Introduced constant objects for SDK metadata, Skyflow IDs, configuration keys, HTTP-related values, file processing, encoding types, JWT settings, and other string literals
  • Updated all source files to reference the new constants instead of hardcoded strings
  • Added ESLint configuration to enforce usage of constants over magic strings
  • Disabled camelCase linting for generated code and specific files using snake_case variables

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/utils/index.ts Defines new constant objects (SDK, SKYFLOW, CONFIG, HTTP_STATUS_CODE, CONTENT_TYPE, HTTP_HEADER, DETECT_STATUS, FILE_EXTENSION, FILE_FORMAT_TYPE, FILE_PROCESSING, ENCODING_TYPE, JWT, API_KEY, URL_PROTOCOL, BOOLEAN_STRING) to replace hardcoded values
src/vault/skyflow/index.ts Replaces hardcoded config-related strings with CONFIG constant references
src/vault/controller/vault/index.ts Replaces hardcoded SDK, Skyflow ID, content type, and encoding strings with constant references
src/vault/controller/detect/index.ts Replaces hardcoded file processing, encoding, and status strings with constant references
src/vault/controller/connections/index.ts Replaces hardcoded SDK, Skyflow auth, content type, and request ID strings with constant references
src/vault/client/index.ts Replaces hardcoded HTTP header, content type, boolean string, and status code values with constant references
src/utils/validations/index.ts Replaces hardcoded Skyflow ID and config strings with constant references
src/utils/jwt-utils/index.ts Adds ESLint disable comment for camelCase rule due to jwt_decode import
src/service-account/index.ts Replaces hardcoded HTTP, content type, JWT, and encoding strings with constant references
test/vault/controller/vault.test.js Updates mock to include new constant structures
test/vault/controller/detect.test.js Updates mock and test assertions to use constants, refactors test setup with improved comments
test/vault/controller/connection.test.js Replaces hardcoded constant references with new SDK and SKYFLOW constant structures
test/vault/utils/utils.test.js Adds ESLint disable comment for camelCase rule due to jwt_decode import
test/vault/utils/jwt-utils/jwt.test.js Adds ESLint disable comment for camelCase rule due to jwt_decode import
src/vault/model/options/deidentify-file/bleep-audio/index.ts Adds ESLint disable comment for camelCase rule for generated code with snake_case properties
samples/vault-api/data-residency.ts Adds ESLint disable comment for camelCase rule due to skyflow_id destructuring
package.json Updates ESLint script to include TypeScript files and removes prettier from lint script
eslint.config.mjs Adds new ESLint configuration with TypeScript support and rules for enforcing constants over magic strings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aadarsh-st aadarsh-st requested a review from Copilot January 27, 2026 10:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 19 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aadarsh-st aadarsh-st requested a review from Copilot January 27, 2026 10:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aadarsh-st aadarsh-st force-pushed the SK-2495-Replace-hardcode-values-with-constants branch from f1f5a65 to b4ecf5a Compare January 27, 2026 11:14
@aadarsh-st aadarsh-st merged commit d60b089 into release/26.1.4 Jan 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants