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

Commit 2e61444

Browse files
committed
Only auto-fill clone URL for blob and repo links
1 parent 2c22a36 commit 2e61444

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/GitHub.App/Services/DialogService.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.ComponentModel.Composition;
33
using System.Threading.Tasks;
44
using GitHub.Api;
5+
using GitHub.Exports;
56
using GitHub.Extensions;
67
using GitHub.Factories;
78
using GitHub.Models;
@@ -38,7 +39,13 @@ public async Task<CloneDialogResult> ShowCloneDialog(IConnection connection, str
3839
if (string.IsNullOrEmpty(url))
3940
{
4041
var clipboardContext = gitHubContextService.FindContextFromClipboard();
41-
url = clipboardContext?.Url;
42+
switch (clipboardContext?.LinkType)
43+
{
44+
case LinkType.Blob:
45+
case LinkType.Repository:
46+
url = clipboardContext?.Url;
47+
break;
48+
}
4249
}
4350

4451
var viewModel = factory.CreateViewModel<IRepositoryCloneViewModel>();

0 commit comments

Comments
 (0)