From 7cb9b204e993f888b88f785978b4cf89000f8456 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 9 Dec 2021 18:48:06 +0300 Subject: feat(tvl.el): Add shortcut for push with Autosubmit+1 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 --- tools/emacs-pkgs/tvl/tvl.el | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tools') diff --git a/tools/emacs-pkgs/tvl/tvl.el b/tools/emacs-pkgs/tvl/tvl.el index 175c0c402939..77aa5e56619b 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) -- cgit 1.4.1