Skip to content

Commit eddbb12

Browse files
committed
Fix: add support for GitLab repository URLs
Extended the repository URL regex to accept both github.com and gitlab.com
1 parent 14040dc commit eddbb12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Files.App/Utils/Git/GitHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ public static async Task CloneRepoAsync(string repoUrl, string repoName, string
943943
ReturnResult.Failed);
944944
}
945945

946-
[GeneratedRegex(@"^(?:https?:\/\/)?(?:www\.)?github\.com\/(?<user>[^\/]+)\/(?<repo>[^\/]+?)(?=\.git|\/|$)(?:\.git)?(?:\/)?", RegexOptions.IgnoreCase)]
946+
[GeneratedRegex(@"^(?:https?:\/\/)?(?:www\.)?(github|gitlab)\.com\/(?<user>[^\/]+)\/(?<repo>[^\/]+?)(?=\.git|\/|$)(?:\.git)?(?:\/)?", RegexOptions.IgnoreCase)]
947947
private static partial Regex GitHubRepositoryRegex();
948948
}
949949
}

0 commit comments

Comments
 (0)