diff --git a/lib/app_sources/github.dart b/lib/app_sources/github.dart index 7823517..f9c53d3 100644 --- a/lib/app_sources/github.dart +++ b/lib/app_sources/github.dart @@ -53,11 +53,12 @@ class GitHub extends AppSource { additionalValidators: [ (value) { try { - if (Uri.parse( - 'https://${value}/api.github.com', - ).scheme.isNotEmpty) { + if (value != null && Uri.parse(value).scheme.isNotEmpty) { throw true; } + if (value != null) { + Uri.parse('https://${value}/api.github.com'); + } } catch (e) { return tr('invalidInput'); } @@ -288,6 +289,9 @@ class GitHub extends AppSource { settingsProvider, ); String? creds = sourceConfig['github-creds']; + if ((additionalSettings['GHReqPrefix'] as String? ?? '').isNotEmpty) { + creds = null; + } if (creds != null) { var userNameEndIndex = creds.indexOf(':'); if (userNameEndIndex > 0) { diff --git a/pubspec.lock b/pubspec.lock index 0144e81..05247eb 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -852,10 +852,10 @@ packages: dependency: transitive description: name: shared_preferences_android - sha256: a2608114b1ffdcbc9c120eb71a0e207c71da56202852d4aab8a5e30a82269e74 + sha256: bd14436108211b0d4ee5038689a56d4ae3620fd72fd6036e113bf1345bc74d9e url: "https://pub.dev" source: hosted - version: "2.4.12" + version: "2.4.13" shared_preferences_foundation: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index d1a870b..0fd184c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.2.5+2321 +version: 1.2.6+2322 environment: sdk: ^3.8.1