feat(emacs-packages/tvl): Init with magit gerrit suffix
Add a simple tvl.el, with only one magit transient command to push and submit in one go to Gerrit Change-Id: If02065797a8db39669b85acf87a1c4b43d1482ee Reviewed-on: https://cl.tvl.fyi/c/depot/+/494 Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
d5c3619118
commit
5b833a1375
3 changed files with 45 additions and 0 deletions
3
tools/emacs-pkgs/tvl/OWNERS
Normal file
3
tools/emacs-pkgs/tvl/OWNERS
Normal file
|
@ -0,0 +1,3 @@
|
|||
inherited: true
|
||||
owners:
|
||||
- glittershark
|
10
tools/emacs-pkgs/tvl/default.nix
Normal file
10
tools/emacs-pkgs/tvl/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
with pkgs.emacsPackages;
|
||||
|
||||
trivialBuild rec {
|
||||
pname = "tvl";
|
||||
version = "1.0";
|
||||
src = ./tvl.el;
|
||||
packageRequires = [ magit ];
|
||||
}
|
32
tools/emacs-pkgs/tvl/tvl.el
Normal file
32
tools/emacs-pkgs/tvl/tvl.el
Normal file
|
@ -0,0 +1,32 @@
|
|||
;;; tvl.el --- description -*- lexical-binding: t; -*-
|
||||
;;
|
||||
;; Copyright (C) 2020 Griffin Smith
|
||||
;;
|
||||
;; Author: Griffin Smith <grfn@gws.fyi>
|
||||
;; Version: 0.0.1
|
||||
;; Package-Requires: (cl-lib magit)
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This file provides shared utilities for interacting with the TVL monorepo
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
(define-suffix-command magit-push-and-submit ()
|
||||
(interactive)
|
||||
(magit-push-refspecs
|
||||
"origin" "HEAD:refs/for/master%l=Code-Review+2,publish-comments,submit"
|
||||
nil))
|
||||
|
||||
(transient-append-suffix
|
||||
#'magit-push
|
||||
["r"]
|
||||
|
||||
(list "P" "Push and submit to gerrit" #'magit-push-and-submit))
|
||||
|
||||
(provide 'tvl)
|
||||
;;; tvl.el ends here
|
Loading…
Reference in a new issue