Sync eng/common directory with azure-sdk-tools for PR 5427 (#4356)
Co-authored-by: archerzz <archerzz@gmail.com>
This commit is contained in:
parent
326ec44db8
commit
466c82a361
@ -44,10 +44,10 @@ function GetGitRemoteValue([string]$repo) {
|
||||
$gitRemotes = (git remote -v)
|
||||
foreach ($remote in $gitRemotes) {
|
||||
if ($remote.StartsWith("origin")) {
|
||||
if ($remote -match 'https://github.com/\S+[\.git]') {
|
||||
if ($remote -match 'https://github.com/\S+') {
|
||||
$result = "https://github.com/$repo.git"
|
||||
break
|
||||
} elseif ($remote -match "git@github.com:\S+[\.git]"){
|
||||
} elseif ($remote -match "git@github.com:\S+"){
|
||||
$result = "git@github.com:$repo.git"
|
||||
break
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user