Skip to content

Commit

Permalink
chore: fallback to std octokit
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Oct 4, 2024
1 parent 1474e54 commit 3ae866a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/types/plugin-context-single.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Env, envValidator } from "./env";
import { Context } from "./context";
import { App } from "octokit";
import { logger } from "../utils/logger";
import { Octokit } from "@octokit/rest";

/**
* Singleton for the plugin context making accessing it throughout
Expand Down Expand Up @@ -56,7 +57,7 @@ export class PluginContext {
}

getContext(): Context {
const octokit: Context["octokit"] = this.getStorageApp()?.octokit;
const octokit: Context["octokit"] = this.getStorageApp()?.octokit ?? new Octokit({ auth: this.inputs.authToken });

if (!octokit) {
throw new Error("Octokit could not be initialized");
Expand Down

0 comments on commit 3ae866a

Please sign in to comment.