summaryrefslogtreecommitdiffhomepage
path: root/attic
diff options
context:
space:
mode:
Diffstat (limited to 'attic')
-rw-r--r--attic/misc.org29
1 files changed, 29 insertions, 0 deletions
diff --git a/attic/misc.org b/attic/misc.org
index 9ca8e01..66e0012 100644
--- a/attic/misc.org
+++ b/attic/misc.org
@@ -768,3 +768,32 @@
(when (or yes (y-or-n-p "Connect to libera using ERC? "))
(erc-select :server "irc.libera.chat")))
#+end_src
+* git helpers
+ #+begin_src emacs-lisp
+
+ (use-package github-review
+ :ensure t
+ :config
+ (defun jao-gnus-github-review ()
+ (interactive)
+ (gnus-summary-select-article-buffer)
+ (goto-char (point-min))
+ (when (re-search-forward "https://github\.com/.*/pull/.*" nil t)
+ (let ((url (match-string-no-properties 0)))
+ (when (yes-or-no-p (format "Start review for %s" url))
+ (github-review-start url)))))
+ (eval-after-load "gnus-art"
+ '(progn
+ (define-key gnus-summary-mode-map "\C-cG" 'jao-gnus-github-review)
+ (define-key gnus-article-mode-map "\C-cG" 'jao-gnus-github-review)))
+
+ (jao-transient-major-mode github-review
+ ["Review"
+ ("a" "Approve" github-review-approve)
+ ("r" "Reject" github-review-reject)
+ ("c" "Comment" github-review-reject)]
+ ["Quit"
+ ("Q" "Bury buffer" bury-buffer)
+ ("k" "Kill buffer" kill-buffer)]))
+
+ #+end_src