Skip to content

Conversation

@Harshi-Shah-CS
Copy link

fix: environment variable parsing for URL formatted values

@Harshi-Shah-CS Harshi-Shah-CS requested a review from a team as a code owner November 13, 2025 09:21
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 fixes a bug in environment variable parsing where values containing colons (such as URLs) were incorrectly split. The fix refactors the parsing logic into a dedicated method that splits only on the first colon, preserving URL schemes and ports in the values.

  • Extracted duplicate parsing logic into a reusable parseEnvVariablesString method
  • Fixed colon-splitting to only split on the first occurrence, preserving URL-formatted values
  • Added test coverage for the URL parsing scenario

Reviewed Changes

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

File Description
src/adapters/base-class.ts Implemented new parseEnvVariablesString method that correctly handles values with colons (e.g., URLs) by splitting on first colon only, and refactored two existing parsing locations to use this shared method
src/adapters/base-class.test.ts Added test case to verify environment variable parsing correctly handles URL-formatted values with multiple colons in the value portion

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

@Harshi-Shah-CS Harshi-Shah-CS merged commit b474704 into development Nov 13, 2025
12 of 13 checks passed
@Harshi-Shah-CS Harshi-Shah-CS deleted the cl-2121 branch November 13, 2025 09:48
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