added review file
This commit is contained in:
parent
ff69ef9a92
commit
842fc2757d
4 changed files with 37 additions and 39 deletions
17
gpm
17
gpm
|
@ -9,14 +9,19 @@ import Turtle
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
echo "Git Project Manager"
|
echo "# <GPM> -- Git Project Manager"
|
||||||
echo "create a new branch gpm (be sure the branch gpm doesn't already exists)"
|
mkNewEmptyBranch "gpm"
|
||||||
debug "git checkout --orphan gpm"
|
|
||||||
echo "cleanup the branch"
|
|
||||||
debug "git rm --cached -r ."
|
|
||||||
initIssues
|
initIssues
|
||||||
initDocs
|
initDocs
|
||||||
|
|
||||||
|
mkNewEmptyBranch :: Text -> IO ()
|
||||||
|
mkNewEmptyBranch br = do
|
||||||
|
putText $ "create a new branch " <> br <> " (be sure the branch " <> br <> " doesn't already exists)"
|
||||||
|
debug $ "git checkout --orphan " <> br
|
||||||
|
echo "cleanup the branch"
|
||||||
|
debug "git rm --cached -r ."
|
||||||
|
|
||||||
|
debug :: Text -> IO ()
|
||||||
debug cmd = do
|
debug cmd = do
|
||||||
putText cmd
|
putText cmd
|
||||||
stdout $ inshell cmd empty
|
stdout $ inshell cmd empty
|
||||||
|
@ -39,4 +44,4 @@ initReview = do
|
||||||
mktree "reviews"
|
mktree "reviews"
|
||||||
putText $ format ("* "%fp) fic
|
putText $ format ("* "%fp) fic
|
||||||
input ("templates" </> "review.org")
|
input ("templates" </> "review.org")
|
||||||
& output fic
|
& output fic
|
||||||
|
|
|
@ -43,15 +43,23 @@
|
||||||
(review-dir "~/.reviews/")
|
(review-dir "~/.reviews/")
|
||||||
(local-review (concat "file:../reviews/" review-file-name))
|
(local-review (concat "file:../reviews/" review-file-name))
|
||||||
(global-review (concat review-dir review-file-name)))
|
(global-review (concat review-dir review-file-name)))
|
||||||
(url-copy-file local-review global-review)
|
(if (file-exists-p local-review)
|
||||||
|
(url-copy-file local-review global-review)
|
||||||
|
(shell-command (concat "touch " global-review)))
|
||||||
(setq org-capture-templates
|
(setq org-capture-templates
|
||||||
`(("c" "Change requested" entry (file+headline global-review)
|
(backquote (("f" "feedback"
|
||||||
"* CHANGE_REQUESTED %?\n %i\n %a")
|
entry (file (lambda () ,global-review))
|
||||||
("q" "question" entry (file+headline global-review)
|
"* FEEDBACK %?\n %i\n %a")
|
||||||
"* QUESTION %?\n %i\n %a")
|
("q" "question"
|
||||||
("r" "refused" entry (file+headline global-review)
|
entry (file (lambda () ,global-review))
|
||||||
"* REFUSED %?\n %i\n %a")))
|
"* QUESTION %?\n %i\n %a")
|
||||||
(setq org-default-notes-file global-review)))
|
("c" "change requested"
|
||||||
|
entry (file (lambda () ,global-review))
|
||||||
|
"* CHANGE_REQUESTED %?\n %i\n %a")
|
||||||
|
("r" "refused"
|
||||||
|
entry (file (lambda () ,global-review))
|
||||||
|
"* REFUSED %?\n %i\n %a"))))
|
||||||
|
(setq org-default-notes-file global-review)))
|
||||||
|
|
||||||
(defun end-review ()
|
(defun end-review ()
|
||||||
"to be call when the reviewer ends its review."
|
"to be call when the reviewer ends its review."
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
#+PROPERTY: ASSIGNEE
|
#+PROPERTY: ASSIGNEE
|
||||||
#+PROPERTY: REVIEWERS
|
#+PROPERTY: REVIEWERS
|
||||||
#+PROPERTY: BRANCH
|
#+PROPERTY: BRANCH
|
||||||
#+TODO: FEEDBACK(f) TODO(t) STARTED(s) WAITING(w) LGTM(l) | DONE(d) CANCELLED(c)
|
#+TODO: TODO(t) STARTED(s) WAITING(w) LGTM(l) | DONE(d) CANCELLED(c)
|
||||||
#+TODO: REVIEW(r) | MERGED(m) ABORTED(a)
|
#+TODO: REVIEW(r) | MERGED(m) ABORTED(a)
|
||||||
#+TODO: ACCEPTED(l) CHANGE_REQUESTED(c) QUESTION(q) | REFUSED(r)
|
#+TODO: ACCEPTED(l) CHANGE_REQUESTED(c) QUESTION(q) FEEDBACK(f) | REFUSED(r)
|
||||||
#+COLUMNS: %38ITEM(Details) %TAGS(Context) %7TODO(To Do) %8ASSIGNEE %5Effort(Time){:}
|
#+COLUMNS: %38ITEM(Details) %TAGS(Context) %7TODO(To Do) %8ASSIGNEE %5Effort(Time){:}
|
||||||
#+TAGS: bug(b) doc(d) ops(o)
|
#+TAGS: bug(b) doc(d) ops(o)
|
||||||
#+STARTUP: content
|
#+STARTUP: content
|
||||||
|
|
|
@ -1,24 +1,9 @@
|
||||||
* [[file:src/Main.hs::27]]
|
* FEEDBACK
|
||||||
|
|
||||||
Remove the direct usage of the file inside and prefer to load templates. If
|
|
||||||
possible compressed one.
|
|
||||||
|
|
||||||
#+BEGIN_SRC elisp
|
[[file:~/y/gpm/gpm::initDocs]]
|
||||||
(org-remember-insinuate)
|
* QUESTION What about creating a new branch for doc?
|
||||||
(define-key global-map "\C-cr" 'org-remember)
|
[[file:~/y/gpm/gpm::initDocs]]
|
||||||
(setq org-remember-templates
|
* FEEDBACK something
|
||||||
'(("Code Review High" ?h "* TODO [#A] %?\n %i\n %a" "~/Review.org" "Issues")
|
[[file:~/y/gpm/gpm::mkNewEmptyBranch%20"gpm"]]
|
||||||
("Code Review Medium" ?m "* TODO [#B] %?\n %i\n %a" "~/Review.org" "Issues")
|
* QUESTION some question
|
||||||
("Code Review Low" ?l "* TODO [#C] %?\n %i\n %a" "~/Review.org" "Issues")
|
[[file:~/y/gpm/gpm::initDocs]]
|
||||||
("Code Review Question" ?? "* TODO %?\n %i\n %a" "~/Review.org" "Questions")))
|
|
||||||
|
|
||||||
(defun my/linenum()
|
|
||||||
"Use line number as the file linking item"
|
|
||||||
;; Optionally, predicate this technique to
|
|
||||||
;; only certain modes
|
|
||||||
;; e.g.
|
|
||||||
;; (when (eq major-mode 'cperl-mode) ...
|
|
||||||
(number-to-string (org-current-line)))
|
|
||||||
(add-hook 'org-create-file-search-functions
|
|
||||||
'my/linenum)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
Loading…
Reference in a new issue