-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Asset sync] Handle additional git remote format (#4929)
Co-authored-by: Scott Beddall <[email protected]>
- Loading branch information
Showing
1 changed file
with
3 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -188,12 +188,13 @@ Function Get-Repo-Language { | |
# origin [email protected]:Azure/azure-sdk-for-python-pr.git (fetch) | ||
# fork [email protected]:UserName/azure-sdk-for-python (fetch) | ||
# azure-sdk https://github.com/azure-sdk/azure-sdk-for-net.git (fetch) | ||
# origin https://github.com/Azure/azure-sdk-for-python/ (fetch) | ||
# ForEach-Object splits the string on whitespace so each of the above strings is actually | ||
# 3 different strings. The first and last pieces won't match anything, the middle string | ||
# will match what is below. If the regular expression needs to be updated the following | ||
# link below will go to a regex playground | ||
# https://regex101.com/r/btVW5A/1 | ||
$lang = $remotes[0] | ForEach-Object { if ($_ -match "azure-sdk-for-(?<lang>[^\-\.]+)") { | ||
# https://regex101.com/r/auOnAr/1 | ||
$lang = $remotes[0] | ForEach-Object { if ($_ -match "azure-sdk-for-(?<lang>[^\-\.\/ ]+)") { | ||
#Return the named language match | ||
return $Matches["lang"] | ||
} | ||
|