mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Base custom request options on defaults, and add basic tests for makeProxyRequestOptions
This commit is contained in:
6
lib/entry-points.js
generated
6
lib/entry-points.js
generated
@@ -145788,7 +145788,11 @@ function getRegistryProxy(action) {
|
||||
return void 0;
|
||||
}
|
||||
function makeProxyRequestOptions(dispatcher) {
|
||||
if (dispatcher === void 0) {
|
||||
return githubUtils.defaults.request;
|
||||
}
|
||||
return {
|
||||
...githubUtils.defaults.request,
|
||||
fetch: (req, init2) => {
|
||||
return (0, import_undici.fetch)(req, { ...init2, dispatcher });
|
||||
}
|
||||
@@ -145797,7 +145801,7 @@ function makeProxyRequestOptions(dispatcher) {
|
||||
function createApiClientWithDetails(apiDetails, { allowExternal = false, proxy = void 0 } = {}) {
|
||||
const auth2 = allowExternal && apiDetails.externalRepoAuth || apiDetails.auth;
|
||||
const retryingOctokit = githubUtils.GitHub.plugin(retry);
|
||||
const requestOptions = proxy === void 0 ? githubUtils.defaults.request : makeProxyRequestOptions(proxy);
|
||||
const requestOptions = makeProxyRequestOptions(proxy);
|
||||
return new retryingOctokit(
|
||||
githubUtils.getOctokitOptions(auth2, {
|
||||
baseUrl: apiDetails.apiURL,
|
||||
|
||||
Reference in New Issue
Block a user