feat(gs/emacs): Switch to org-tracker
Work is now using JIRA instead of Clubhouse, so I've started writing org-tracker[0] as a pluggable-backend version of org-clubhouse (I'll probably add github issue support as well!). This switches my personal config to use that instead of org-clubhouse, including the checkout-branch-with-ticket-id stuff I had locally. [0]: https://github.com/glittershark/org-tracker Change-Id: I3cf72d6640b155c92ca9ddd1d9d9b5167367951a Reviewed-on: https://cl.tvl.fyi/c/depot/+/3180 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
This commit is contained in:
parent
42c3da7881
commit
263958e4d3
4 changed files with 35 additions and 33 deletions
|
@ -353,7 +353,7 @@ private/hlissner/snippets."
|
||||||
:desc "Store link" :n "l" #'org-store-link
|
:desc "Store link" :n "l" #'org-store-link
|
||||||
:desc "Browse notes" :n "N" #'+hlissner/browse-notes
|
:desc "Browse notes" :n "N" #'+hlissner/browse-notes
|
||||||
:desc "Org capture" :n "x" #'+org-capture/open
|
:desc "Org capture" :n "x" #'+org-capture/open
|
||||||
:desc "Create clubhouse story" :n "c" #'org-clubhouse-create-story
|
:desc "Create clubhouse story" :n "c" #'org-tracker-create-issue
|
||||||
:desc "Archive subtree" :n "k" #'org-archive-subtree
|
:desc "Archive subtree" :n "k" #'org-archive-subtree
|
||||||
:desc "Goto clocked-in note" :n "g" #'org-clock-goto
|
:desc "Goto clocked-in note" :n "g" #'org-clock-goto
|
||||||
:desc "Clock Out" :n "o" #'org-clock-out)
|
:desc "Clock Out" :n "o" #'org-clock-out)
|
||||||
|
|
Binary file not shown.
|
@ -223,6 +223,22 @@
|
||||||
(load! "+commands")
|
(load! "+commands")
|
||||||
(load! "cpp")
|
(load! "cpp")
|
||||||
|
|
||||||
|
|
||||||
|
(add-to-list 'load-path "/home/grfn/code/org-tracker")
|
||||||
|
(require 'org-tracker)
|
||||||
|
(use-package! org-tracker
|
||||||
|
:hook (org-mode . org-tracker-mode)
|
||||||
|
:config
|
||||||
|
(setq org-tracker-state-alist '(("BACKLOG" . "Backlog")
|
||||||
|
("PLANNED" . "Planned")
|
||||||
|
("TODO" . "Seleted for Development")
|
||||||
|
("ACTIVE" . "In Progress")
|
||||||
|
("PR" . "Code Review")
|
||||||
|
("DONE" . "Done"))
|
||||||
|
org-tracker-username "griffin@readyset.io"
|
||||||
|
org-tracker-claim-ticket-on-status-update '("ACTIVE" "PR" "DONE")
|
||||||
|
org-tracker-create-stories-with-labels 'existing))
|
||||||
|
|
||||||
(load! "+private")
|
(load! "+private")
|
||||||
|
|
||||||
(require 'dash)
|
(require 'dash)
|
||||||
|
@ -269,20 +285,6 @@
|
||||||
|
|
||||||
(setq doom-modeline-height 12)
|
(setq doom-modeline-height 12)
|
||||||
|
|
||||||
(load "/home/grfn/code/org-clubhouse/org-clubhouse.el")
|
|
||||||
(use-package! org-clubhouse
|
|
||||||
:hook (org-mode . org-clubhouse-mode)
|
|
||||||
:config
|
|
||||||
(setq org-clubhouse-state-alist '(("BACKLOG" . "Unscheduled")
|
|
||||||
("TODO" . "Ready for Development")
|
|
||||||
("ACTIVE" . "In Development")
|
|
||||||
("PR" . "Ready for Review")
|
|
||||||
("DONE" . "Completed"))
|
|
||||||
org-clubhouse-username "griffinsmith"
|
|
||||||
org-clubhouse-claim-story-on-status-update '("ACTIVE" "PR" "DONE")
|
|
||||||
org-clubhouse-create-stories-with-labels 'existing
|
|
||||||
org-clubhouse-workflow-name "Engineering"))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; Should really figure out which of these is correct, eventually
|
;; Should really figure out which of these is correct, eventually
|
||||||
|
@ -517,45 +519,45 @@
|
||||||
["f"]
|
["f"]
|
||||||
(list "o" "Reset HEAD@{1}" #'magit-reset-head-previous))
|
(list "o" "Reset HEAD@{1}" #'magit-reset-head-previous))
|
||||||
|
|
||||||
(defun magit-read-org-clubhouse-branch-name ()
|
(defun magit-read-org-tracker-branch-name ()
|
||||||
(when-let ((story-id (org-clubhouse-clocked-in-story-id)))
|
(when-let ((issue-id (org-tracker-clocked-in-issue-id)))
|
||||||
(let ((desc
|
(let ((desc
|
||||||
(magit-read-string-ns
|
(magit-read-string-ns
|
||||||
(format "Story description (to go after gs/ch%d/)"
|
(format "Issue description (to go after gs/%s/)"
|
||||||
story-id))))
|
issue-id))))
|
||||||
(format "gs/ch%d/%s" story-id desc))))
|
(format "gs/%s/%s" issue-id desc))))
|
||||||
|
|
||||||
(defun magit-read-org-clubhouse-branch-args ()
|
(defun magit-read-org-tracker-branch-args ()
|
||||||
(if-let ((story-id (org-clubhouse-clocked-in-story-id)))
|
(if-let ((issue-id (org-tracker-clocked-in-issue-id)))
|
||||||
(let ((start-point (magit-read-starting-point
|
(let ((start-point (magit-read-starting-point
|
||||||
"Create and checkout branch for Clubhouse story"
|
"Create and checkout branch for Tracker issue"
|
||||||
nil
|
nil
|
||||||
"origin/master")))
|
"origin/master")))
|
||||||
(if (magit-rev-verify start-point)
|
(if (magit-rev-verify start-point)
|
||||||
(when-let ((desc (magit-read-org-clubhouse-branch-name)))
|
(when-let ((desc (magit-read-org-tracker-branch-name)))
|
||||||
(list desc start-point))
|
(list desc start-point))
|
||||||
(user-error "Not a valid starting point: %s" choice)))
|
(user-error "Not a valid starting point: %s" choice)))
|
||||||
(user-error "No currently clocked-in clubhouse story")))
|
(user-error "No currently clocked-in tracker issue")))
|
||||||
|
|
||||||
(transient-define-suffix magit-checkout-org-clubhouse-branch (branch start-point)
|
(transient-define-suffix magit-checkout-org-tracker-branch (branch start-point)
|
||||||
(interactive (magit-read-org-clubhouse-branch-args))
|
(interactive (magit-read-org-tracker-branch-args))
|
||||||
(magit-branch-and-checkout branch start-point))
|
(magit-branch-and-checkout branch start-point))
|
||||||
|
|
||||||
(transient-define-suffix magit-rename-org-clubhouse-branch (old new)
|
(transient-define-suffix magit-rename-org-tracker-branch (old new)
|
||||||
(interactive
|
(interactive
|
||||||
(let ((branch (magit-read-local-branch "Rename branch")))
|
(let ((branch (magit-read-local-branch "Rename branch")))
|
||||||
(list branch (magit-read-org-clubhouse-branch-name))))
|
(list branch (magit-read-org-tracker-branch-name))))
|
||||||
(when (and old new)
|
(when (and old new)
|
||||||
(magit-branch-rename old new)))
|
(magit-branch-rename old new)))
|
||||||
|
|
||||||
(transient-append-suffix
|
(transient-append-suffix
|
||||||
#'magit-branch
|
#'magit-branch
|
||||||
["c"]
|
["c"]
|
||||||
(list "C" "Checkout Clubhouse branch" #'magit-checkout-org-clubhouse-branch))
|
(list "C" "Checkout Tracker branch" #'magit-checkout-org-tracker-branch))
|
||||||
(transient-append-suffix
|
(transient-append-suffix
|
||||||
#'magit-branch
|
#'magit-branch
|
||||||
["c"]
|
["c"]
|
||||||
(list "M" "Rename branch to Clubhouse ticket" #'magit-rename-org-clubhouse-branch)))
|
(list "M" "Rename branch to Tracker ticket" #'magit-rename-org-tracker-branch)))
|
||||||
|
|
||||||
;; (defun grfn/split-window-more-sensibly (&optional window)
|
;; (defun grfn/split-window-more-sensibly (&optional window)
|
||||||
;; (let ((window (or window (selected-window))))
|
;; (let ((window (or window (selected-window))))
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
(package! string-inflection)
|
(package! string-inflection)
|
||||||
|
|
||||||
;;; Org
|
;;; Org
|
||||||
(package! org-clubhouse
|
(package! org-tracker
|
||||||
:recipe (:host file
|
:recipe (:host file
|
||||||
:local-repo "~/code/org-clubhouse"))
|
:local-repo "~/code/org-tracker"))
|
||||||
(package! org-alert)
|
(package! org-alert)
|
||||||
(package! ob-http)
|
(package! ob-http)
|
||||||
(package! ob-ipython)
|
(package! ob-ipython)
|
||||||
|
|
Loading…
Reference in a new issue