mirror of
https://github.com/actions/github-script.git
synced 2026-02-09 03:45:24 +00:00
Avoid setting baseUrl to undefined when input is not provided
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user