Skip to content

Commit

Permalink
Only set base URL when input is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmgross committed Nov 16, 2023
1 parent 0a6deda commit 28e4318
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35509,9 +35509,11 @@ async function main() {
userAgent: userAgent || undefined,
previews: previews ? previews.split(',') : undefined,
retry: retryOpts,
request: requestOpts,
baseUrl: baseUrl || undefined
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.
Expand Down
7 changes: 5 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ async function main(): Promise<void> {
userAgent: userAgent || undefined,
previews: previews ? previews.split(',') : undefined,
retry: retryOpts,
request: requestOpts,
baseUrl: baseUrl || undefined
request: requestOpts
}

if (baseUrl) {
opts.baseUrl = baseUrl
}

const github = getOctokit(token, opts, retry, requestLog)
Expand Down

0 comments on commit 28e4318

Please sign in to comment.