add fetch to octokit

This commit is contained in:
jpaul 2023-11-14 09:28:50 +01:00
parent 4b1508ec6f
commit 6f0209b406
3 changed files with 18 additions and 0 deletions

6
dist/cleanup/index.js generated vendored
View File

@ -74641,6 +74641,9 @@ function createRef(sha) {
console.log(`creating ref ${ref} for metrics tree ${sha}`); console.log(`creating ref ${ref} for metrics tree ${sha}`);
const octokit = new rest_1.Octokit({ const octokit = new rest_1.Octokit({
auth: getGitHubToken(), auth: getGitHubToken(),
request: {
fetch: fetch,
},
}); });
const context = github.context; const context = github.context;
const response = yield octokit.request(`POST /repos/${context.repo.owner}/${context.repo.repo}/git/refs`, Object.assign(Object.assign({}, context.repo), { ref, const response = yield octokit.request(`POST /repos/${context.repo.owner}/${context.repo.repo}/git/refs`, Object.assign(Object.assign({}, context.repo), { ref,
@ -74653,6 +74656,9 @@ function createTree(metadataJson) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const octokit = new rest_1.Octokit({ const octokit = new rest_1.Octokit({
auth: getGitHubToken(), auth: getGitHubToken(),
request: {
fetch: fetch,
},
}); });
const context = github.context; const context = github.context;
core.info(`creating tree at ${context.repo.owner}/${context.repo.repo}`); core.info(`creating tree at ${context.repo.owner}/${context.repo.repo}`);

6
dist/main/index.js generated vendored
View File

@ -75638,6 +75638,9 @@ function createRef(sha) {
console.log(`creating ref ${ref} for metrics tree ${sha}`); console.log(`creating ref ${ref} for metrics tree ${sha}`);
const octokit = new rest_1.Octokit({ const octokit = new rest_1.Octokit({
auth: getGitHubToken(), auth: getGitHubToken(),
request: {
fetch: fetch,
},
}); });
const context = github.context; const context = github.context;
const response = yield octokit.request(`POST /repos/${context.repo.owner}/${context.repo.repo}/git/refs`, Object.assign(Object.assign({}, context.repo), { ref, const response = yield octokit.request(`POST /repos/${context.repo.owner}/${context.repo.repo}/git/refs`, Object.assign(Object.assign({}, context.repo), { ref,
@ -75650,6 +75653,9 @@ function createTree(metadataJson) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const octokit = new rest_1.Octokit({ const octokit = new rest_1.Octokit({
auth: getGitHubToken(), auth: getGitHubToken(),
request: {
fetch: fetch,
},
}); });
const context = github.context; const context = github.context;
core.info(`creating tree at ${context.repo.owner}/${context.repo.repo}`); core.info(`creating tree at ${context.repo.owner}/${context.repo.repo}`);

View File

@ -216,6 +216,9 @@ export async function createRef(sha: string) {
console.log(`creating ref ${ref} for metrics tree ${sha}`); console.log(`creating ref ${ref} for metrics tree ${sha}`);
const octokit = new Octokit({ const octokit = new Octokit({
auth: getGitHubToken(), auth: getGitHubToken(),
request: {
fetch: fetch,
},
}); });
const context = github.context const context = github.context
@ -234,6 +237,9 @@ export async function createRef(sha: string) {
export async function createTree(metadataJson: string): Promise<string> { export async function createTree(metadataJson: string): Promise<string> {
const octokit = new Octokit({ const octokit = new Octokit({
auth: getGitHubToken(), auth: getGitHubToken(),
request: {
fetch: fetch,
},
}); });
const context = github.context const context = github.context