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.

fix(github): skip issues opened by the configured app bot

Franz Rebaza9078121ab856
diff --git a/apps/api/src/plugins/github/webhooks/issue-opened.ts b/apps/api/src/plugins/github/webhooks/issue-opened.ts
index 630935660..499e098db 100644
--- a/apps/api/src/plugins/github/webhooks/issue-opened.ts
+++ b/apps/api/src/plugins/github/webhooks/issue-opened.ts
@@ -39,6 +39,14 @@ export async function handleIssueOpened(payload: IssueOpenedPayload) {
const { issue, repository } = payload;
+ const appName = process.env.GITHUB_APP_NAME;
+ if (appName && issue.user?.login === `${appName}[bot]`) {
+ console.log(
+ `Issue #${issue.number} was created by the configured GitHub App, skipping task creation`,
+ );
+ return;
+ }
+
const integrations = await findAllIntegrationsByRepo(
repository.owner.login,
repository.name,