diff options
author | Kyle Meyer <kyle@kyleam.com> | 2018-04-28 21:37:30 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2018-04-28 21:45:49 -0400 |
commit | c428b355e5d0782291dfed96d264065e93855ad6 (patch) | |
tree | 20b5091ad312133558fd43e01291214936fe56fb /lisp | |
parent | ef445a9bd35789981cb5509d539d6617e6794313 (diff) | |
download | emacs.d-c428b355e5d0782291dfed96d264065e93855ad6.tar.gz |
km/magit-open-github-pr: New command
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/km-magit.el | 12 |
1 files changed, 12 insertions, 0 deletions
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 |