Close diff when PR is submitted

This commit is contained in:
Jeremy Dormitzer 2024-09-05 06:18:19 -06:00
parent 47727d73f9
commit 4af3063f30

View File

@ -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