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

Commit dbbaa8d

Browse files
committed
Allow filtering my owner URL
Search for URLs that contain the Filter rather than requiring an exact match.
1 parent 09580ef commit dbbaa8d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/GitHub.App/ViewModels/Dialog/Clone/RepositorySelectViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ bool FilterItem(object obj)
181181
{
182182
return
183183
item.Caption.Contains(Filter, StringComparison.CurrentCultureIgnoreCase) ||
184-
item.Url.ToString().Equals(Filter, StringComparison.OrdinalIgnoreCase);
184+
item.Url.ToString().Contains(Filter, StringComparison.OrdinalIgnoreCase);
185185
}
186186

187187
return true;

test/GitHub.App.UnitTests/ViewModels/Dialog/Clone/RepositorySelectViewModelTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public class TheFilterProperty
2222
[TestCase("OWNER/NAME", "owner", "name", "https://github.com/owner/name", 1)]
2323
[TestCase("https://github.com/owner/name", "owner", "name", "https://github.com/owner/name", 1)]
2424
[TestCase("HTTPS://GITHUB.COM/OWNER/NAME", "owner", "name", "https://github.com/owner/name", 1)]
25+
[TestCase("https://github.com/owner", "owner", "name", "https://github.com/owner/name", 1)]
26+
[TestCase("https://github.com/jcansdale/TestDriven.Net", "owner", "name", "https://github.com/jcansdale/TestDriven.Net-issues", 1)]
2527
public async Task Filter(string filter, string owner, string name, string url, int expectCount)
2628
{
2729
var contributedToRepositories = new[]

0 commit comments

Comments
 (0)