about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-12-09T15·48+0300
committerclbot <clbot@tvl.fyi>2021-12-10T18·54+0000
commit7cb9b204e993f888b88f785978b4cf89000f8456 (patch)
tree41342838c181ba1efdc993d895c9927b131bc006 /tools
parentb2d46aed2b6e729ea7be3986f9020a57851ddae1 (diff)
feat(tvl.el): Add shortcut for push with Autosubmit+1 r/3195
This almost makes for a sort of fire&forget button, except we don't
have a way to automatically pick reviewers yet :)

Change-Id: I6f446270f8aaf0409ccb6321bdbb5c349079cd19
Diffstat (limited to 'tools')
-rw-r--r--tools/emacs-pkgs/tvl/tvl.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/emacs-pkgs/tvl/tvl.el b/tools/emacs-pkgs/tvl/tvl.el
index 175c0c4029..77aa5e5661 100644
--- a/tools/emacs-pkgs/tvl/tvl.el
+++ b/tools/emacs-pkgs/tvl/tvl.el
@@ -64,6 +64,17 @@
   #'magit-push ["r"]
   (list "W" "push to Gerrit as a work-in-progress" #'magit-gerrit-push-wip))
 
+(transient-define-suffix magit-gerrit-push-autosubmit ()
+  "Push to Gerrit with autosubmit enabled."
+  (interactive)
+  (magit-push-refspecs tvl-gerrit-remote
+                       (tvl--gerrit-ref tvl-target-branch '("Autosubmit+1"))
+                       nil))
+
+(transient-append-suffix
+  #'magit-push ["r"]
+  (list "A" "push to Gerrit with autosubmit enabled" #'magit-gerrit-push-autosubmit))
+
 (transient-define-suffix magit-gerrit-submit ()
   "Push to Gerrit for review."
   (interactive)