From fab5d23f143095fffcdcf7516e42594ce5c5e041 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 12 Aug 2022 14:02:58 +0300 Subject: feat(tvl.el): add magit-gerrit-push-private This adds a new function (intentionally bound to a rare key (Q)) in the push menu which can push a *private* change to Gerrit. A private change is one that, until submitted, is only visible to its owner and all explicitly added people (reviewers, CC). Change-Id: I6ee13dbbad099584475d3efac96e5d9b86efbc26 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6061 Tested-by: BuildkiteCI Reviewed-by: grfn Autosubmit: tazjin --- tools/emacs-pkgs/tvl/tvl.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tools/emacs-pkgs/tvl') diff --git a/tools/emacs-pkgs/tvl/tvl.el b/tools/emacs-pkgs/tvl/tvl.el index 500ffa165317..46dbe0ca6834 100644 --- a/tools/emacs-pkgs/tvl/tvl.el +++ b/tools/emacs-pkgs/tvl/tvl.el @@ -104,6 +104,19 @@ passes. This is potentially dangerous, use with care." #'magit-push ["r"] (list "P" "push & rubberstamp to Gerrit" #'magit-gerrit-rubberstamp)) +(transient-define-suffix magit-gerrit-push-private () + "Push a private change to Gerrit." + (interactive) + (magit-push-refspecs tvl-gerrit-remote + (tvl--gerrit-ref tvl-target-branch + '("private" + "publish-comments")) + nil)) + +(transient-append-suffix + #'magit-push ["r"] + (list "Q" "push private change to Gerrit" #'magit-gerrit-push-private)) + (defvar magit-cl-history nil) (defun magit-read-cl (prompt remote) (let* ((refs (prog2 (message "Determining available refs...") -- cgit 1.4.1