From c428b355e5d0782291dfed96d264065e93855ad6 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 28 Apr 2018 21:37:30 -0400 Subject: km/magit-open-github-pr: New command --- lisp/km-magit.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lisp/km-magit.el b/lisp/km-magit.el index 9a392e6..b311962 100644 --- a/lisp/km-magit.el +++ b/lisp/km-magit.el @@ -910,6 +910,18 @@ simple solution that works for me." (km/magit-github-diff-link) (user-error "Don't know how to make a link from here"))))) +(defun km/magit-open-github-pr () + (interactive) + (browse-url + (format "%s/compare/master...kyleam:%s?expand=1" + (or (km/magit-github-url) + (user-error "Couldn't determine GitHub URL")) + (let ((current (magit-get-current-branch))) + (if (member (concat "kyleam/" current) + (magit-list-refnames "refs/remotes/kyleam")) + current + (magit-read-remote-branch "PR branch" "kyleam")))))) + ;;; Git Rebase mode -- cgit v1.2.3