Refactor GitHub Integration (#6713)

* fix: refactor

* fix: tests

* fix: apply octokit plugin pattern
This commit is contained in:
Apoorv Mishra
2024-03-27 17:22:06 +05:30
committed by GitHub
parent 6703ea801f
commit bea36f87a6
7 changed files with 297 additions and 165 deletions

View File

@@ -3,7 +3,7 @@ import { PluginManager, Hook } from "@server/utils/PluginManager";
import config from "../plugin.json";
import router from "./api/github";
import env from "./env";
import { githubApp } from "./github";
import { GitHub } from "./github";
import { uninstall } from "./uninstall";
const enabled =
@@ -22,7 +22,7 @@ if (enabled) {
},
{
type: Hook.UnfurlProvider,
value: { unfurl: githubApp.unfurl, cacheExpiry: Minute },
value: { unfurl: GitHub.unfurl, cacheExpiry: Minute },
},
{
type: Hook.Uninstall,