cli: maity report shows branch and PR before linking and asks on a mismatch
tsk-41hjdphkcw4e open
Oliver adopted this on 2026-11-03 (req-e78k30f6r49k).
Problem: maity report links the card to the PR of whatever branch is checked out. With the wrong branch checked out, the card ends up on the wrong PR, and today nothing can undo that link.
- Before linking, print the branch, the PR number and the PR title it is about to link.
- If the PR does not look like it belongs to the card (for example, the PR body and title do not mention the card id, or the branch already links another card), ask for confirmation. Without a terminal, refuse with a clear message and an option such as
--yes. - Check whether the contract needs a change (for example a way to correct a wrong link). If so, do the contract PR first.
- Tests for: a matching PR (no prompt), a mismatch (prompt or refuse), and no PR found.