Close diff when PR is submitted
This commit is contained in:
parent
47727d73f9
commit
4af3063f30
@ -85,7 +85,11 @@ Does not work on already-created pull requests."
|
|||||||
(let ((target forge--buffer-base-branch)
|
(let ((target forge--buffer-base-branch)
|
||||||
(source forge--buffer-head-branch))
|
(source forge--buffer-head-branch))
|
||||||
(magit-diff-range (format "%s..%s" target source))))
|
(magit-diff-range (format "%s..%s" target source))))
|
||||||
|
(defun forge--submit-create-pullreq-after-advice (&rest args)
|
||||||
|
(when-let ((buf (magit-get-mode-buffer 'magit-diff-mode)))
|
||||||
|
(quit-window nil (get-buffer-window buf))))
|
||||||
(add-hook 'forge-create-pullreq-hook #'forge-diff-for-pr)
|
(add-hook 'forge-create-pullreq-hook #'forge-diff-for-pr)
|
||||||
|
(advice-add 'forge--submit-create-pullreq :after #'forge--submit-create-pullreq-after-advice)
|
||||||
:custom
|
:custom
|
||||||
(forge-owned-accounts '((jdormit . (remote-name "jdormit"))))
|
(forge-owned-accounts '((jdormit . (remote-name "jdormit"))))
|
||||||
:general
|
:general
|
||||||
|
Loading…
Reference in New Issue
Block a user