Skip to content

Conversation

@aadarsh-st
Copy link
Collaborator

No description provided.

@github-actions
Copy link

Gitleaks Findings: No secrets detected. Safe to proceed!

@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.

@aadarsh-st aadarsh-st requested a review from Copilot January 28, 2026 08:39
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 to replace magic strings with named constants, improving maintainability and consistency. The changes also introduce ESLint configuration with TypeScript support to enforce camelCase naming and prevent the use of string literals for object access.

Changes:

  • Introduced new constant groups (SDK, SKYFLOW, CONFIG, HTTP_HEADER, CONTENT_TYPE, ENCODING_TYPE, etc.) to replace hardcoded string literals throughout the codebase
  • Updated ESLint configuration to use typescript-eslint with rules enforcing camelCase and restricting magic strings
  • Added eslint-disable comments for unavoidable camelCase violations (e.g., external library usage with snake_case)

Reviewed changes

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

Show a summary per file
File Description
src/utils/index.ts Introduced constant groups to centralize magic strings
src/vault/skyflow/index.ts Replaced string literals with CONFIG constants
src/vault/controller/vault/index.ts Replaced string literals with SDK, SKYFLOW, CONTENT_TYPE, and ENCODING_TYPE constants
src/vault/controller/detect/index.ts Replaced string literals with SDK, FILE_PROCESSING, DETECT_STATUS, and ENCODING_TYPE constants
src/vault/controller/connections/index.ts Replaced string literals with SDK, SKYFLOW, REQUEST, and CONTENT_TYPE constants
src/vault/client/index.ts Replaced string literals with HTTP_HEADER, CONTENT_TYPE, BOOLEAN_STRING, and HTTP_STATUS_CODE constants
src/utils/validations/index.ts Replaced string literals with CONFIG, SKYFLOW, and API_KEY constants
src/utils/jwt-utils/index.ts Added eslint-disable comment for jwt_decode import
src/service-account/index.ts Replaced string literals with HTTP_HEADER, CONTENT_TYPE, HTTP_STATUS_CODE, JWT, and ENCODING_TYPE constants
test/vault/utils/utils.test.js Added eslint-disable comment for jwt_decode import
test/vault/utils/jwt-utils/jwt.test.js Added eslint-disable comment for jwt_decode import
test/vault/controller/vault.test.js Updated mock to include new constant structures
test/vault/controller/detect.test.js Updated mock to include new constants and improved test structure with better documentation
test/vault/controller/connection.test.js Updated references to use SDK and SKYFLOW constant groups
src/vault/model/options/deidentify-file/bleep-audio/index.ts Added eslint-disable comment for camelCase
samples/vault-api/data-residency.ts Added eslint-disable comment for skyflow_id destructuring
package.json Updated version, added ESLint dependencies, and modified lint scripts to include TypeScript files
eslint.config.mjs Created new ESLint configuration with TypeScript support and custom rules

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

@github-actions
Copy link

Gitleaks Findings: No secrets detected. Safe to proceed!

@github-actions
Copy link

Gitleaks Findings: No secrets detected. Safe to proceed!

@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.

1 similar comment
@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.

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.

4 participants