about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-12T11·02+0300
committerclbot <clbot@tvl.fyi>2022-08-13T00·31+0000
commitfab5d23f143095fffcdcf7516e42594ce5c5e041 (patch)
treea25e239cffe2fde5e8dc4706daf1948d6a99c5a2
parent31443d21eed5986d8b2968951e3e38283008b892 (diff)
feat(tvl.el): add magit-gerrit-push-private r/4420
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 <grfn@gws.fyi>
Autosubmit: tazjin <tazjin@tvl.su>
-rw-r--r--tools/emacs-pkgs/tvl/tvl.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/emacs-pkgs/tvl/tvl.el b/tools/emacs-pkgs/tvl/tvl.el
index 500ffa1653..46dbe0ca68 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...")