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 <grfn@gws.fyi>
Autosubmit: tazjin <tazjin@tvl.su>
This commit is contained in:
Vincent Ambo 2022-08-12 14:02:58 +03:00 committed by clbot
parent 31443d21ee
commit fab5d23f14

View file

@ -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...")