-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix hostname support for Enterprise installations of GitHub #118
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"editor.formatOnSave": false, | ||
"editor.formatOnType": false | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -153,7 +153,14 @@ function Invoke-GHRestMethod | |||||
|
||||||
$hostName = $(Get-GitHubConfiguration -Name "ApiHostName") | ||||||
|
||||||
$url = "https://api.$hostName/$UriFragment" | ||||||
if ($hostName -eq "github.com") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have generally been avoiding double-quoted strings unless I am expecting for them to be interpreted due to embedded expressions/variables/etc...
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :) sure...i will change to single |
||||||
{ | ||||||
$url = "https://api.$hostName/$UriFragment" | ||||||
} | ||||||
else | ||||||
{ | ||||||
$url = "https://$hostName/api/v3/$UriFragment" | ||||||
} | ||||||
|
||||||
# It's possible that we are directly calling the "nextLink" from a previous command which | ||||||
# provides the full URI. If that's the case, we'll just use exactly what was provided to us. | ||||||
|
@@ -966,4 +973,3 @@ function Get-MediaAcceptHeader | |||||
|
||||||
return ($acceptHeaders -join ',') | ||||||
} | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At present time, I don't want to check-in editor-specific files into the project. I realize that you added this as a result of needing to undo your other formatting changes , and I'm open to being convinced otherwise, but at the moment I'm not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ...how do i remove the file...just add it to gitignore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git add .vscode/settings.json
git commit
git push
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks...this is done