Skip to content

Commit b307f4d

Browse files
elirantutiaclaude
andcommitted
add add-to-kanban action to prs widget
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent aa64141 commit b307f4d

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/renderer/components/project-tab/widgets/github-widgets.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,14 @@ function buildPRActions(
417417
}
418418

419419
actions.appendChild(reviewGroup);
420+
421+
const kanbanBtn = document.createElement('button');
422+
kanbanBtn.className = 'widget-github-row-action-btn widget-github-row-action-btn-primary';
423+
kanbanBtn.textContent = 'Add to Kanban';
424+
kanbanBtn.title = 'Create a board task from this PR';
425+
kanbanBtn.addEventListener('click', onAction(() => addPRToKanban(item)));
426+
actions.appendChild(kanbanBtn);
427+
420428
return actions;
421429
}
422430

@@ -434,5 +442,13 @@ function addIssueToKanban(item: GithubItem): void {
434442
});
435443
}
436444

445+
function addPRToKanban(item: GithubItem): void {
446+
showTaskModal('create', undefined, undefined, {
447+
title: `[Review] ${item.title}`,
448+
prompt: `Review this PR #${item.number}: ${item.html_url}`,
449+
tags: ['github-prs'],
450+
});
451+
}
452+
437453
export const createGithubPRsWidget: WidgetFactory = (host) => makeGithubWidget('prs', host);
438454
export const createGithubIssuesWidget: WidgetFactory = (host) => makeGithubWidget('issues', host);

0 commit comments

Comments
 (0)