Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 9c7a83d

Browse files
Collecting other offending case comparisons
1 parent e3f79bf commit 9c7a83d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/GitHub.App/Services/PullRequestService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ public IObservable<Unit> Checkout(ILocalRepositoryModel repository, PullRequestD
392392
{
393393
await gitClient.Checkout(repo, localBranchName);
394394
}
395-
else if (repository.CloneUrl.Owner == pullRequest.HeadRepositoryOwner)
395+
else if (string.Equals(repository.CloneUrl.Owner, pullRequest.HeadRepositoryOwner, StringComparison.OrdinalIgnoreCase))
396396
{
397397
var remote = await gitClient.GetHttpRemote(repo, "origin");
398398
await gitClient.Fetch(repo, remote.Name);
@@ -524,7 +524,7 @@ public IObservable<bool> EnsureLocalBranchesAreMarkedAsPullRequests(ILocalReposi
524524

525525
public bool IsPullRequestFromRepository(ILocalRepositoryModel repository, PullRequestDetailModel pullRequest)
526526
{
527-
return string.Equals(repository?.CloneUrl.Owner, pullRequest.HeadRepositoryOwner, StringComparison.OrdinalIgnoreCase);
527+
return string.Equals(repository.CloneUrl?.Owner, pullRequest.HeadRepositoryOwner, StringComparison.OrdinalIgnoreCase);
528528
}
529529

530530
public IObservable<Unit> SwitchToBranch(ILocalRepositoryModel repository, PullRequestDetailModel pullRequest)

src/GitHub.InlineReviews/Services/PullRequestSessionManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ async Task<PullRequestSession> GetSessionInternal(string owner, string name, int
225225
{
226226
PullRequestSession session = null;
227227
WeakReference<PullRequestSession> weakSession;
228-
var key = Tuple.Create(owner, number);
228+
var key = Tuple.Create(owner.ToLowerInvariant(), number);
229229

230230
if (sessions.TryGetValue(key, out weakSession))
231231
{

0 commit comments

Comments
 (0)