Skip to content

[Feature]: Manually link existing PR to a Task #1148

Description

@khuongdo

Problem

KanDev only surfaces PRs that were created through its own PR creator. If a PR is opened externally — via the GitHub web UI, gh pr create, CI automation, or another tool — there is no way to associate it with a task. The task card stays unlinked even when a directly related PR is already open.

Proposed solution

Two complementary approaches:

  1. Auto-link by branch name — If a task has an associated worktree/branch, automatically detect any open PR whose head branch matches and surface it on the task card. No user action required. This mirrors how vibe-kanban handles it.
  2. Manual link — Add a "Link PR" action on the task card that accepts a PR number or URL. KanDev fetches the PR details from GitHub and attaches it to the task. Unlinking should also be supported.

Auto-link covers the common case; manual link covers tasks without a worktree or branch mismatch.

Affected area

Task card / PR integration

Who needs this?

Individual developer, Team

Target workflow

  • Task management
  • PR / code review workflow

Alternatives considered

  • Creating all PRs exclusively through KanDev's PR creator (not always practical in team or CI contexts)

Acceptance criteria

  • Task card shows linked PR(s) regardless of how the PR was created
  • Auto-link: open PRs whose head branch matches the task's worktree branch are surfaced automatically
  • Manual link: user can input a PR number or URL to attach a PR to any task
  • Manual unlink is supported

Risks and constraints

No response

References

  • vibe-kanban PR auto-linking by branch name

Before submitting

  • I checked existing issues and did not find this request already tracked.
  • This request describes user value, not only an implementation detail.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions