kaneo (minimalist kanban) fork to experiment adding a tangled integration github.com/usekaneo/kaneo
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(api): sync task labels to Gitea

Tin 8b6f932b 3c47c376

+16
+12
apps/api/src/label/controllers/assign-label-to-task.ts
··· 3 3 import db from "../../database"; 4 4 import { labelTable, projectTable, taskTable } from "../../database/schema"; 5 5 import { 6 + removeLabelFromGitea, 7 + syncLabelToGitea, 8 + } from "../../plugins/gitea/utils/sync-label-to-gitea"; 9 + import { 6 10 removeLabelFromGitHub, 7 11 syncLabelToGitHub, 8 12 } from "../../plugins/github/utils/sync-label-to-github"; ··· 56 60 removeLabelFromGitHub(label.taskId, label.name).catch((error) => { 57 61 console.error("Failed to remove label from GitHub:", error); 58 62 }); 63 + removeLabelFromGitea(label.taskId, label.name).catch((error) => { 64 + console.error("Failed to remove label from Gitea:", error); 65 + }); 59 66 } 60 67 61 68 syncLabelToGitHub(taskId, updatedLabel.name, updatedLabel.color).catch( 62 69 (error) => { 63 70 console.error("Failed to sync label to GitHub:", error); 71 + }, 72 + ); 73 + syncLabelToGitea(taskId, updatedLabel.name, updatedLabel.color).catch( 74 + (error) => { 75 + console.error("Failed to sync label to Gitea:", error); 64 76 }, 65 77 ); 66 78
+4
apps/api/src/label/controllers/create-label.ts
··· 1 1 import db from "../../database"; 2 2 import { labelTable } from "../../database/schema"; 3 + import { syncLabelToGitea } from "../../plugins/gitea/utils/sync-label-to-gitea"; 3 4 import { syncLabelToGitHub } from "../../plugins/github/utils/sync-label-to-github"; 4 5 5 6 async function createLabel( ··· 16 17 if (taskId) { 17 18 syncLabelToGitHub(taskId, name, color).catch((error) => { 18 19 console.error("Failed to sync label to GitHub:", error); 20 + }); 21 + syncLabelToGitea(taskId, name, color).catch((error) => { 22 + console.error("Failed to sync label to Gitea:", error); 19 23 }); 20 24 } 21 25