This repository was archived by the owner on Jun 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Incorrect casing in the clone url owner causes issues #1804
Copy link
Copy link
Closed
Description
Issue
If you clone a repo using incorrect casing in the owner. Some functionalities just don't work.
- Visual Studio is
https://github.com/github/VisualStudio.git - If you instead clone it with
https://github.com/GitHub/VisualStudio.git
The following functionalities are broken
- Any checked out branch will not be correlated to the corresponding pull request.
return pullRequest.HeadRepositoryOwner == repository.CloneUrl.Owner; - Checking out an internal pull request will result in the branch path resembling that of a fork pull request checkout
else if (repository.CloneUrl.Owner == pullRequest.HeadRepositoryOwner) - Multiple pull request sessions can exist
var key = Tuple.Create(owner, number); - The
OpenFileInWorkingDirectoryfunctionality does not work.
- The
Other suspicious code paths
if (context.SectionConnection.Username == item.CloneUrl.Owner)
Original Issue
I noticed this while working with another project...
VisualStudio/src/GitHub.App/Services/PullRequestService.cs
Lines 525 to 528 in 4af9d1c
| public bool IsPullRequestFromRepository(ILocalRepositoryModel repository, PullRequestDetailModel pullRequest) | |
| { | |
| return pullRequest.HeadRepositoryOwner == repository.CloneUrl.Owner; | |
| } |
pullRequest.HeadRepositoryOwner is "justaprogrammer"
repository.CloneUrl.Owner is "JustAProgrammer"
