added review file

This commit is contained in:
Yann Esposito (Yogsototh) 2018-08-29 18:14:45 +02:00
parent ff69ef9a92
commit 842fc2757d
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
4 changed files with 37 additions and 39 deletions

17
gpm
View file

@ -9,14 +9,19 @@ import Turtle
main :: IO ()
main = do
echo "Git Project Manager"
echo "create a new branch gpm (be sure the branch gpm doesn't already exists)"
debug "git checkout --orphan gpm"
echo "cleanup the branch"
debug "git rm --cached -r ."
echo "# <GPM> -- Git Project Manager"
mkNewEmptyBranch "gpm"
initIssues
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
putText cmd
stdout $ inshell cmd empty
@ -39,4 +44,4 @@ initReview = do
mktree "reviews"
putText $ format ("* "%fp) fic
input ("templates" </> "review.org")
& output fic
& output fic

View file

@ -43,15 +43,23 @@
(review-dir "~/.reviews/")
(local-review (concat "file:../reviews/" 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
`(("c" "Change requested" entry (file+headline global-review)
"* CHANGE_REQUESTED %?\n %i\n %a")
("q" "question" entry (file+headline global-review)
"* QUESTION %?\n %i\n %a")
("r" "refused" entry (file+headline global-review)
"* REFUSED %?\n %i\n %a")))
(setq org-default-notes-file global-review)))
(backquote (("f" "feedback"
entry (file (lambda () ,global-review))
"* FEEDBACK %?\n %i\n %a")
("q" "question"
entry (file (lambda () ,global-review))
"* QUESTION %?\n %i\n %a")
("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 ()
"to be call when the reviewer ends its review."

View file

@ -4,9 +4,9 @@
#+PROPERTY: ASSIGNEE
#+PROPERTY: REVIEWERS
#+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: 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){:}
#+TAGS: bug(b) doc(d) ops(o)
#+STARTUP: content

View file

@ -1,24 +1,9 @@
* [[file:src/Main.hs::27]]
Remove the direct usage of the file inside and prefer to load templates. If
possible compressed one.
* FEEDBACK
#+BEGIN_SRC elisp
(org-remember-insinuate)
(define-key global-map "\C-cr" 'org-remember)
(setq org-remember-templates
'(("Code Review High" ?h "* TODO [#A] %?\n %i\n %a" "~/Review.org" "Issues")
("Code Review Medium" ?m "* TODO [#B] %?\n %i\n %a" "~/Review.org" "Issues")
("Code Review Low" ?l "* TODO [#C] %?\n %i\n %a" "~/Review.org" "Issues")
("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
[[file:~/y/gpm/gpm::initDocs]]
* QUESTION What about creating a new branch for doc?
[[file:~/y/gpm/gpm::initDocs]]
* FEEDBACK something
[[file:~/y/gpm/gpm::mkNewEmptyBranch%20"gpm"]]
* QUESTION some question
[[file:~/y/gpm/gpm::initDocs]]