-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue where ssh remote urls don't work (#17)
- Loading branch information
Showing
1 changed file
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -172,12 +172,20 @@ private async Task<ICollection<PullRequest>> GetMergedPullRequestsForRepositoryA | |
|
||
private static void GetOwnerAndProject(string url, out string owner, out string project) | ||
{ | ||
var regex = new Regex(@"^https:\/\/github.com\/(?<owner>.+)\/(?<project>.+).git$", RegexOptions.Compiled); | ||
string pattern = @"^https:\/\/github.com\/(?<owner>.+)\/(?<project>.+).git$"; | ||
|
||
if (url.StartsWith("[email protected]:")) | ||
{ | ||
pattern = @"^[email protected]:(?<owner>.+)\/(?<project>.+).git$"; | ||
} | ||
|
||
var regex = new Regex(pattern, RegexOptions.Compiled); | ||
|
||
owner = regex.Match(url).Groups["owner"].Value; | ||
project = regex.Match(url).Groups["project"].Value; | ||
} | ||
|
||
|
||
private static long? GetVersionAsLong(string friendlyName) | ||
{ | ||
var versionAsString = new string(friendlyName.Where(c => char.IsDigit(c) || c == '.').ToArray()); | ||
|