mirror of
https://github.com/actions/github-script.git
synced 2026-02-07 19:47:26 +00:00
Avoid setting baseURL if the input is not provided
This commit is contained in:
parent
85717e4e3b
commit
d09af7480d
2 changed files with 9 additions and 4 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
|
@ -35509,9 +35509,11 @@ async function main() {
|
|||
userAgent: userAgent || undefined,
|
||||
previews: previews ? previews.split(',') : undefined,
|
||||
retry: retryOpts,
|
||||
request: requestOpts,
|
||||
baseUrl: baseUrl || lib_github.context.apiUrl
|
||||
request: requestOpts
|
||||
};
|
||||
if (baseUrl) {
|
||||
opts.baseUrl = baseUrl;
|
||||
}
|
||||
const github = (0,lib_github.getOctokit)(token, opts, plugin_retry_dist_node.retry, dist_node.requestLog);
|
||||
const script = core.getInput('script', { required: true });
|
||||
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
|
||||
|
|
|
|||
|
|
@ -44,8 +44,11 @@ async function main(): Promise<void> {
|
|||
userAgent: userAgent || undefined,
|
||||
previews: previews ? previews.split(',') : undefined,
|
||||
retry: retryOpts,
|
||||
request: requestOpts,
|
||||
baseUrl: baseUrl || context.apiUrl
|
||||
request: requestOpts
|
||||
}
|
||||
|
||||
if (baseUrl) {
|
||||
opts.baseUrl = baseUrl
|
||||
}
|
||||
|
||||
const github = getOctokit(token, opts, retry, requestLog)
|
||||
|
|
|
|||
Loading…
Reference in a new issue