Skip to content

Commit

Permalink
Merge pull request #12 from aneillans/master
Browse files Browse the repository at this point in the history
Resolve on-premise issues
  • Loading branch information
DarqueWarrior authored Aug 5, 2017
2 parents 3bc1603 + 758d53a commit 7c4b611
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Team.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
RootModule = ''

# Version number of this module.
ModuleVersion = '0.1.28'
ModuleVersion = '0.1.29'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
2 changes: 1 addition & 1 deletion src/common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function _getProjects {
$instance = $env:TEAM_ACCT

# Build the url to list the projects
$listurl = $instance + '/_apis' + $resource + '?api-version=' + $version
$listurl = $instance + '/_apis' + $resource + '?api-version=' + $version + '&$top=9999'
Write-Verbose "listurl = $listurl"

# Call the REST API
Expand Down
6 changes: 4 additions & 2 deletions src/team.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,10 @@ function Add-TeamAccount {
}

# If they only gave an account name add visualstudio.com
if($Account -match "(?<protocol>https?\://)?(?<account>[A-Z0-9][-A-Z0-9]*[A-Z0-9])(?<domain>\.visualstudio\.com)?") {
$Account = "https://$($matches.account).visualstudio.com"
if ($Account -notlike "*/*") {
if($Account -match "(?<protocol>https?\://)?(?<account>[A-Z0-9][-A-Z0-9]*[A-Z0-9])(?<domain>\.visualstudio\.com)?") {
$Account = "https://$($matches.account).visualstudio.com"
}
}

$encodedPat = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(":$_pat"))
Expand Down

0 comments on commit 7c4b611

Please sign in to comment.