Add correct fetch options to octokit
This commit is contained in:
@ -10,6 +10,7 @@ import { id } from "tsafe/id";
|
|||||||
import type { SemVer } from "../tools/SemVer";
|
import type { SemVer } from "../tools/SemVer";
|
||||||
import { same } from "evt/tools/inDepth/same";
|
import { same } from "evt/tools/inDepth/same";
|
||||||
import type { BuildContext } from "./buildContext";
|
import type { BuildContext } from "./buildContext";
|
||||||
|
import fetch from "make-fetch-happen";
|
||||||
|
|
||||||
type GetLatestsSemVersionedTag = ReturnType<
|
type GetLatestsSemVersionedTag = ReturnType<
|
||||||
typeof getLatestsSemVersionedTagFactory
|
typeof getLatestsSemVersionedTagFactory
|
||||||
@ -159,7 +160,13 @@ export async function getLatestsSemVersionedTag({
|
|||||||
|
|
||||||
const octokit = new Octokit({
|
const octokit = new Octokit({
|
||||||
...(githubToken === undefined ? {} : { auth: githubToken }),
|
...(githubToken === undefined ? {} : { auth: githubToken }),
|
||||||
request: buildContext.fetchOptions
|
request: {
|
||||||
|
fetch: (url: string, options?: any) =>
|
||||||
|
fetch(url, {
|
||||||
|
...options,
|
||||||
|
...buildContext.fetchOptions
|
||||||
|
})
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return octokit;
|
return octokit;
|
||||||
|
Reference in New Issue
Block a user