mirror of
https://github.com/actions/github-script.git
synced 2026-04-07 14:49:25 +00:00
Avoid setting baseUrl to undefined when input is not provided
This commit is contained in:
parent
e69ef5462f
commit
d319f8f5b5
3 changed files with 88 additions and 4 deletions
|
|
@ -44,8 +44,13 @@ async function main(): Promise<void> {
|
|||
userAgent: userAgent || undefined,
|
||||
previews: previews ? previews.split(',') : undefined,
|
||||
retry: retryOpts,
|
||||
request: requestOpts,
|
||||
baseUrl: baseUrl || undefined
|
||||
request: requestOpts
|
||||
}
|
||||
|
||||
// Setting `baseUrl` to undefined will prevent the default value from being used
|
||||
// https://github.com/actions/github-script/issues/436
|
||||
if (baseUrl) {
|
||||
opts.baseUrl = baseUrl
|
||||
}
|
||||
|
||||
const github = getOctokit(token, opts, retry, requestLog)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue