Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

refactor: remove environment variable checks

Andrej Acevski43ae891139d2
diff --git a/apps/api/src/github-integration/utils/create-github-app.ts b/apps/api/src/github-integration/utils/create-github-app.ts
index 8dcda1778..01b3f8125 100644
--- a/apps/api/src/github-integration/utils/create-github-app.ts
+++ b/apps/api/src/github-integration/utils/create-github-app.ts
@@ -3,22 +3,11 @@ import { App } from "octokit";
dotenv.config();
-if (
- !process.env.GITHUB_APP_ID ||
- !process.env.GITHUB_PRIVATE_KEY ||
- !process.env.GITHUB_WEBHOOK_SECRET
-) {
- throw new Error(
- "GITHUB_APP_ID, GITHUB_PRIVATE_KEY and GITHUB_WEBHOOK_SECRET must be set",
- );
-}
-
const githubApp: App = new App({
- appId: process.env.GITHUB_APP_ID,
- privateKey: process.env.GITHUB_PRIVATE_KEY,
-
+ appId: process.env.GITHUB_APP_ID ?? "",
+ privateKey: process.env.GITHUB_PRIVATE_KEY ?? "",
webhooks: {
- secret: process.env.GITHUB_WEBHOOK_SECRET,
+ secret: process.env.GITHUB_WEBHOOK_SECRET ?? "",
},
});