diff options
-rw-r--r-- | tissue/issue.scm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tissue/issue.scm b/tissue/issue.scm index 8d1d11c..91585a7 100644 --- a/tissue/issue.scm +++ b/tissue/issue.scm @@ -48,6 +48,7 @@ post-author post-date post-relative-date + authors issues)) (define %aliases @@ -132,6 +133,21 @@ return #f." (time-monotonic->date (make-time time-monotonic 0 timestamp))) +(define authors + (memoize-thunk + (lambda () + "Return a list of all authors who have committed to this git +repository." + (delete-duplicates + (map (cut resolve-alias <> (%aliases)) + (call-with-input-pipe + (lambda (port) + (port-transduce (tmap (lambda (line) + (match (string-split line #\tab) + ((_ author) author)))) + rcons get-line port)) + "git" "shortlog" "--summary")))))) + (define (resolve-alias name aliases) "Resolve NAME against ALIASES, a list of aliases. ALIASES should be in the form of the argument of the same name to `tissue-configuration' |