about summary refs log tree commit diff
path: root/tools/emacs-pkgs/tvl/tvl.el
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-06-19T03·24-0400
committerglittershark <grfn@gws.fyi>2020-06-19T03·35+0000
commit5b833a13757faadb0b73f0c7ab66424904227300 (patch)
tree695568baf728bc4dbdd01108cafb072fd35d4f76 /tools/emacs-pkgs/tvl/tvl.el
parentd5c36191180f72726fd12ce36f2db7ffa977fb61 (diff)
feat(emacs-packages/tvl): Init with magit gerrit suffix r/1036
Add a simple tvl.el, with only one magit transient command to push and
submit in one go to Gerrit

Change-Id: If02065797a8db39669b85acf87a1c4b43d1482ee
Reviewed-on: https://cl.tvl.fyi/c/depot/+/494
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to '')
-rw-r--r--tools/emacs-pkgs/tvl/tvl.el32
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/emacs-pkgs/tvl/tvl.el b/tools/emacs-pkgs/tvl/tvl.el
new file mode 100644
index 0000000000..31d1143188
--- /dev/null
+++ b/tools/emacs-pkgs/tvl/tvl.el
@@ -0,0 +1,32 @@
+;;; tvl.el --- description -*- lexical-binding: t; -*-
+;;
+;; Copyright (C) 2020 Griffin Smith
+;;
+;; Author: Griffin Smith <grfn@gws.fyi>
+;; Version: 0.0.1
+;; Package-Requires: (cl-lib magit)
+;;
+;; This file is not part of GNU Emacs.
+;;
+;;; Commentary:
+;;
+;; This file provides shared utilities for interacting with the TVL monorepo
+;;
+;;; Code:
+
+(require 'magit)
+
+(define-suffix-command magit-push-and-submit ()
+  (interactive)
+  (magit-push-refspecs
+   "origin" "HEAD:refs/for/master%l=Code-Review+2,publish-comments,submit"
+   nil))
+
+(transient-append-suffix
+  #'magit-push
+  ["r"]
+
+  (list "P" "Push and submit to gerrit" #'magit-push-and-submit))
+
+(provide 'tvl)
+;;; tvl.el ends here