Unverified Commit 7d64c676 authored by Alex Li's avatar Alex Li Committed by GitHub

️ Add `ssh://git@github.com/flutter/flutter.git` as a standard remote (#131333)

Resolves #98020.
parent 252973c6
......@@ -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');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment