git-patchwork-bot: extract PR matching logic into testable functions

Pull the merge commit parsing and pull request matching out of pwrun()
into standalone functions that can be unit tested without mocking the
patchwork API or git:

- parse_merge_logline(): extracts ref and URL from a merge subject
- find_matching_pr(): matches a merge against a set of patchwork PRs

Add 18 new tests covering both functions, including the bluetooth PR
scenario, protocol/subdomain/suffix mismatches, and edge cases.

Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Assisted-by: claude-opus-4-6
2 files changed