Skip to content

Conversation

@chrisstayte
Copy link

@chrisstayte chrisstayte commented Oct 22, 2025

Changes

  • remove % from forbidden characters in git URLs
    devops uses %20 in repository URLs, and I would like to deploy from devops

Copilot AI review requested due to automatic review settings October 22, 2025 00:05
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 allows percent-encoded characters (like %20 for spaces) in git repository URLs to support Azure DevOps repositories. The change removes % from the list of forbidden characters and adds validation to ensure any percent signs are part of valid percent-encoding sequences.

  • Removed % from the dangerous characters array to allow percent-encoded URLs
  • Updated SSH URL validation regex to allow % characters in the path portion
  • Added validation to ensure percent signs are only used in valid percent-encoding format (e.g., %20)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

return;
}

// Ensure any percent signs are valid percent-encodings like %20
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

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

The variable $path is not defined in this scope. For SSH URLs, you need to extract the path portion from $value before validating percent-encoding. Consider extracting the path after the colon character using explode(':', $value, 2)[1] ?? ''.

Suggested change
// Ensure any percent signs are valid percent-encodings like %20
// Ensure any percent signs are valid percent-encodings like %20
$path = explode(':', $value, 2)[1] ?? '';

Copilot uses AI. Check for mistakes.
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.

2 participants