Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Allow searching by repository URL
  • Loading branch information
jcansdale committed Jan 23, 2019
commit 2e2f2f5c32fc0963004e5718f0d776f1418caeef
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ bool FilterItem(object obj)
{
if (obj is IRepositoryItemViewModel item && !string.IsNullOrWhiteSpace(Filter))
{
return item.Caption.Contains(Filter, StringComparison.CurrentCultureIgnoreCase);
return
item.Caption.Contains(Filter, StringComparison.CurrentCultureIgnoreCase) ||
item.Url.ToString().Equals(Filter, StringComparison.OrdinalIgnoreCase);
}

return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class TheFilterProperty
[TestCase("name", "owner", "name", "https://github.com/owner/name", 1)]
[TestCase("owner/name", "owner", "name", "https://github.com/owner/name", 1)]
[TestCase("OWNER/NAME", "owner", "name", "https://github.com/owner/name", 1)]
[TestCase("https://github.com/owner/name", "owner", "name", "https://github.com/owner/name", 1)]
[TestCase("HTTPS://GITHUB.COM/OWNER/NAME", "owner", "name", "https://github.com/owner/name", 1)]
public async Task Filter(string filter, string owner, string name, string url, int expectCount)
{
var contributedToRepositories = new[]
Expand Down