-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable all TFS URL's #144
Enable all TFS URL's #144
Conversation
…Repositories. This better matches the name and implied function of the tool. Note: Im not happy with line 31! "if (repoUrl.ToString().Contains("_git"))"
Thank you for your Pull Request. |
@@ -28,9 +28,17 @@ public RepositoryDescription(Uri repoUrl) | |||
|
|||
var gitSeparator = new[] { "/_git/" }; | |||
var splitPath = repoUrl.AbsolutePath.Split(gitSeparator, StringSplitOptions.None); | |||
if (splitPath.Length < 2) | |||
if (repoUrl.ToString().Contains("_git")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use "/_git/" (like the git separator) otherwise if a repo is named e.g. /abc_git_dev/ this code would not work correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE
@MrHinsh Sorry I've forgotten to submit my review, my mistake |
…tion.cs): fix incorrect URL check for Git repository Correct the URL check to ensure it accurately identifies Git repository URLs. The previous condition was too broad and could lead to false positives. The updated condition checks for the specific "/_git/" segment, ensuring more precise validation.
I have updated this for the changes... and the test entry was removed as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for your contribution
Update both code and tests to enable use with all TFS URL's not just Repositories. This better matches the name and implied function of the tool.
Note: I'm not happy with line 31, and it may need the original coder to analyze intent at this point to validate this works.
All tests pass! New tests added for non-repo TFS URL's