change octokit init to env variable

This commit is contained in:
jpaul 2023-11-13 05:14:11 +01:00
parent 038296d909
commit e187800569
3 changed files with 6 additions and 6 deletions

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

@ -74956,7 +74956,7 @@ function createRef(sha) {
return __awaiter(this, void 0, void 0, function* () {
const ref = `refs/metrics/` + getCommitSha();
console.log(`creating ref ${ref} for metrics tree ${sha}`);
const octokit = github.getOctokit(getGitHubToken());
const octokit = new rest_1.Octokit({ auth: process.env.GITHUB_TOKEN });
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,
sha }));
@ -74967,7 +74967,7 @@ exports.createRef = createRef;
function createTree(json) {
return __awaiter(this, void 0, void 0, function* () {
console.log(`creating tree at jessiscript/re_build_tracking`);
const octokit = github.getOctokit(getGitHubToken());
const octokit = new rest_1.Octokit({ auth: process.env.GITHUB_TOKEN });
const context = github.context;
const response = yield octokit.request(`POST /repos/${context.repo.owner}/${context.repo.repo}/git/trees`, Object.assign(Object.assign({}, context.repo), { tree: [
{

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

@ -75953,7 +75953,7 @@ function createRef(sha) {
return __awaiter(this, void 0, void 0, function* () {
const ref = `refs/metrics/` + getCommitSha();
console.log(`creating ref ${ref} for metrics tree ${sha}`);
const octokit = github.getOctokit(getGitHubToken());
const octokit = new rest_1.Octokit({ auth: process.env.GITHUB_TOKEN });
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,
sha }));
@ -75964,7 +75964,7 @@ exports.createRef = createRef;
function createTree(json) {
return __awaiter(this, void 0, void 0, function* () {
console.log(`creating tree at jessiscript/re_build_tracking`);
const octokit = github.getOctokit(getGitHubToken());
const octokit = new rest_1.Octokit({ auth: process.env.GITHUB_TOKEN });
const context = github.context;
const response = yield octokit.request(`POST /repos/${context.repo.owner}/${context.repo.repo}/git/trees`, Object.assign(Object.assign({}, context.repo), { tree: [
{

View File

@ -220,7 +220,7 @@ export async function saveReportJson(content: string): Promise<void> {
export async function createRef(sha: string) {
const ref = `refs/metrics/` + getCommitSha()
console.log(`creating ref ${ref} for metrics tree ${sha}`);
const octokit = github.getOctokit(getGitHubToken());
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });
const context = github.context
const response = await octokit.request(
@ -237,7 +237,7 @@ export async function createRef(sha: string) {
export async function createTree(json: string): Promise<string> {
console.log(`creating tree at jessiscript/re_build_tracking`);
const octokit = github.getOctokit(getGitHubToken());
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });
const context = github.context
const response = await octokit.request(