Skip to content

Commit

Permalink
Try without base-url entirely
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmgross committed Nov 16, 2023
1 parent df3133d commit 98dabfb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
16 changes: 8 additions & 8 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35500,7 +35500,7 @@ async function main() {
const debug = core.getBooleanInput('debug');
const userAgent = core.getInput('user-agent');
const previews = core.getInput('previews');
const baseUrl = core.getInput('base-url');
// const baseUrl = core.getInput('base-url')
const retries = parseInt(core.getInput('retries'));
const exemptStatusCodes = parseNumberArray(core.getInput('retry-exempt-status-codes'));
const [retryOpts, requestOpts] = getRetryOptions(retries, exemptStatusCodes, utils.defaults);
Expand All @@ -35511,13 +35511,13 @@ async function main() {
retry: retryOpts,
request: requestOpts
};
if (baseUrl) {
debug && console.log(`Using custom base URL: ${baseUrl}`);
opts.baseUrl = baseUrl;
}
else {
debug && console.log('Using default base URL');
}
// Testing without base URL entirely.
// if (baseUrl) {
// debug && console.log(`Using custom base URL: ${baseUrl}`)
// opts.baseUrl = baseUrl
// } else {
// debug && console.log('Using default base URL')
// }
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
15 changes: 8 additions & 7 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async function main(): Promise<void> {
const debug = core.getBooleanInput('debug')
const userAgent = core.getInput('user-agent')
const previews = core.getInput('previews')
const baseUrl = core.getInput('base-url')
// const baseUrl = core.getInput('base-url')
const retries = parseInt(core.getInput('retries'))
const exemptStatusCodes = parseNumberArray(
core.getInput('retry-exempt-status-codes')
Expand All @@ -47,12 +47,13 @@ async function main(): Promise<void> {
request: requestOpts
}

if (baseUrl) {
debug && console.log(`Using custom base URL: ${baseUrl}`)
opts.baseUrl = baseUrl
} else {
debug && console.log('Using default base URL')
}
// Testing without base URL entirely.
// if (baseUrl) {
// debug && console.log(`Using custom base URL: ${baseUrl}`)
// opts.baseUrl = baseUrl
// } else {
// debug && console.log('Using default base URL')
// }

const github = getOctokit(token, opts, retry, requestLog)
const script = core.getInput('script', {required: true})
Expand Down

0 comments on commit 98dabfb

Please sign in to comment.