⚡️ Add ssh://git@github.com/flutter/flutter.git as a standard remote (#131333)
Resolves #98020.
This commit is contained in:
@@ -689,6 +689,7 @@ class VersionUpstreamValidator {
|
||||
static final List<String> _standardRemotes = <String>[
|
||||
'https://github.com/flutter/flutter.git',
|
||||
'git@github.com:flutter/flutter.git',
|
||||
'ssh://git@github.com/flutter/flutter.git',
|
||||
];
|
||||
|
||||
// Strips ".git" suffix from a given string, preferably an url.
|
||||
|
||||
@@ -325,6 +325,7 @@ void main() {
|
||||
const String flutterStandardUrlDotGit = 'https://github.com/flutter/flutter.git';
|
||||
const String flutterNonStandardUrlDotGit = 'https://githubmirror.com/flutter/flutter.git';
|
||||
const String flutterStandardSshUrlDotGit = 'git@github.com:flutter/flutter.git';
|
||||
const String flutterFullSshUrlDotGit = 'ssh://git@github.com/flutter/flutter.git';
|
||||
|
||||
VersionCheckError? runUpstreamValidator({
|
||||
String? versionUpstreamUrl,
|
||||
@@ -394,6 +395,10 @@ void main() {
|
||||
expect(runUpstreamValidator(versionUpstreamUrl: flutterStandardSshUrlDotGit), isNull);
|
||||
});
|
||||
|
||||
testWithoutContext('does not return error at full ssh url with FLUTTER_GIT_URL unset', () {
|
||||
expect(runUpstreamValidator(versionUpstreamUrl: flutterFullSshUrlDotGit), isNull);
|
||||
});
|
||||
|
||||
testWithoutContext('stripDotGit removes ".git" suffix if any', () {
|
||||
expect(VersionUpstreamValidator.stripDotGit('https://github.com/flutter/flutter.git'), 'https://github.com/flutter/flutter');
|
||||
expect(VersionUpstreamValidator.stripDotGit('https://github.com/flutter/flutter'), 'https://github.com/flutter/flutter');
|
||||
|
||||
Reference in New Issue
Block a user