I started using https://github.com/redguardtoo/vc-msg which is awesome. But often I would like to jump to the pr not just the commit. I found a way to do so by taking the data from git-commit-link and running it through a simple bash script
#!/usr/bin/env bash
git_url=$1
echo $git_url | sed 's/https:\/\/github.com/repos/' | sed 's/commit/commits/' | sed 's/$/\/pulls/' | xargs gh api | jq -r .[].html_url | xargs xdg-open
but I can't figure out how to write the elisp so i can call it from the ui.
(eval-after-load 'vc-msg-git
'(progn
(push '("p" "[p]r open pr on github"
(lambda ()
(let* ((info vc-msg-previous-commit-info))
(with-temp-buffer
(insert (plist-get info :id))
(call-interactively 'git-link-commit)))))
vc-msg-git-extra)))
i have that written i feel like i just need to wrap part of it in a (shell-command) but havent been able to get it working.