commit f4c7e72866fdd3fa257af8aa9b2c494c1688f3ec parent 7628a0620afde6fee740338a0f44d7e0b6f39fdd Author: Vincent Demeester <vincent@sbr.pm> Date: Thu, 25 Aug 2022 11:33:20 +0200 tools/emacs: add push options to magit-push Signed-off-by: Vincent Demeester <vincent@sbr.pm> Diffstat:
M | tools/emacs/config/config-vcs.el | | | 11 | +++++++++++ |
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/tools/emacs/config/config-vcs.el b/tools/emacs/config/config-vcs.el @@ -83,6 +83,17 @@ ?S "Sign using gpg" "--gpg-sign=" #'magit-read-gpg-secret-key) (magit-define-popup-switch 'magit-log-popup ?m "Omit merge commits" "--no-merges") + ;; cargo-culted from https://github.com/magit/magit/issues/3717#issuecomment-734798341 + ;; valid gitlab options are defined in https://docs.gitlab.com/ee/user/project/push_options.html + ;; + ;; the second argument to transient-append-suffix is where to append + ;; to, not sure what -u is, but this works + (transient-append-suffix 'magit-push "-u" + '(1 "=s" "Skip gitlab pipeline" "--push-option=ci.skip")) + (transient-append-suffix 'magit-push "=s" + '(1 "=m" "Create gitlab merge-request" "--push-option=merge_request.create")) + (transient-append-suffix 'magit-push "=m" + '(1 "=o" "Set push option" "--push-option=")) ;; Will prompt, can only set one extra ;; Hide "Recent Commits" (magit-add-section-hook 'magit-status-sections-hook