mirror of
https://github.com/outline/outline.git
synced 2026-11-21 21:44:30 +03:00
* linear settings and oauth * unfurl * unfurl impl fix for recent merge from main * fetch labels * state icon * linear icon * uninstall hook * lint * i18n * cleanup * use workspace key, reduce icon size * determine completion percentage * extract completionPercentage to separate method
28 lines
655 B
TypeScript
28 lines
655 B
TypeScript
import { Minute } from "@shared/utils/time";
|
|
import { Hook, PluginManager } from "@server/utils/PluginManager";
|
|
import config from "../plugin.json";
|
|
import router from "./api/linear";
|
|
import env from "./env";
|
|
import { Linear } from "./linear";
|
|
import { uninstall } from "./uninstall";
|
|
|
|
const enabled = !!env.LINEAR_CLIENT_ID && !!env.LINEAR_CLIENT_SECRET;
|
|
|
|
if (enabled) {
|
|
PluginManager.add([
|
|
{
|
|
...config,
|
|
type: Hook.API,
|
|
value: router,
|
|
},
|
|
{
|
|
type: Hook.UnfurlProvider,
|
|
value: { unfurl: Linear.unfurl, cacheExpiry: Minute.seconds },
|
|
},
|
|
{
|
|
type: Hook.Uninstall,
|
|
value: uninstall,
|
|
},
|
|
]);
|
|
}
|