Skip to content

Commit daedc03

Browse files
committed
PluginsManager: fix "new issue" URL for some plugins
since the `UrlSourceCode` field is inconsistent in the manifest file
1 parent 35e0438 commit daedc03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Flow.Launcher.Infrastructure.UserSettings;
33
using System;
44
using System.Collections.Generic;
5-
using System.Text;
5+
using System.Text.RegularExpressions;
66

77
namespace Flow.Launcher.Plugin.PluginsManager
88
{
@@ -53,8 +53,8 @@ public List<Result> LoadContextMenus(Result selectedResult)
5353
{
5454
// standard UrlSourceCode format in PluginsManifest's plugins.json file: https://github.com/jjw24/Flow.Launcher.Plugin.Putty/tree/master
5555
var link = pluginManifestInfo.UrlSourceCode.StartsWith("https://github.com")
56-
? pluginManifestInfo.UrlSourceCode.Replace("/tree/master", "/issues/new/choose")
57-
: pluginManifestInfo.UrlSourceCode;
56+
? Regex.Replace(pluginManifestInfo.UrlSourceCode, @"\/tree\/\w+$", "") + "/issues/new/choose"
57+
: pluginManifestInfo.UrlSourceCode;
5858

5959
Context.API.OpenUrl(link);
6060
return true;

0 commit comments

Comments
 (0)