summaryrefslogtreecommitdiffhomepage
path: root/attic
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-11-21 22:34:12 +0000
committerjao <jao@gnu.org>2021-11-21 22:34:12 +0000
commit9f1abc66775bee8b1ac552e22fad22090d630235 (patch)
tree786628877c5ff80a9ade79c4aaae6c931ed75a64 /attic
parent16ef1af572a782eb855e9981c98d85884d434599 (diff)
downloadelibs-9f1abc66775bee8b1ac552e22fad22090d630235.tar.gz
elibs-9f1abc66775bee8b1ac552e22fad22090d630235.tar.bz2
code-review, a really nice superseding of github-code-review
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