Allow existing '/refs' in SourceHut URLs (#1347)

This commit is contained in:
Imran Remtulla
2024-01-27 20:08:05 -05:00
parent b239f9bd05
commit de09f3ece2

View File

@ -39,6 +39,15 @@ class SourceHut extends AppSource {
String standardUrl,
Map<String, dynamic> additionalSettings,
) async {
if (standardUrl.endsWith('/refs')) {
standardUrl = standardUrl
.split('/')
.reversed
.toList()
.sublist(1)
.reversed
.join('/');
}
Uri standardUri = Uri.parse(standardUrl);
String appName = standardUri.pathSegments.last;
bool fallbackToOlderReleases =