diff options
author | Arun Isaac | 2021-09-26 22:31:52 +0530 |
---|---|---|
committer | Arun Isaac | 2021-09-26 22:31:52 +0530 |
commit | 40714ddc779547dcee8d45e983da2429adc156ef (patch) | |
tree | 3f7f3837da04f1d3dc11aaac5953c56fa9166794 /gnbug | |
parent | 2580763fcc905afb392791ef9c592f3ae418d1b0 (diff) | |
download | gn-gemtext-40714ddc779547dcee8d45e983da2429adc156ef.tar.gz |
gnbug: Move issue printing to separate function.
* gnbug (print-issue): New function.
(gnbug-list): Call print-issue.
Diffstat (limited to 'gnbug')
-rwxr-xr-x | gnbug | 40 |
1 files changed, 22 insertions, 18 deletions
@@ -277,6 +277,27 @@ List recent updates. "HEAD") "HEAD"))))) +(define (print-issue issue-number issue) + "Print ISSUE with number ISSUE-NUMBER." + (format #t "~a ~a ~a ~a~a~a~%" + (magenta (string-append "#" (number->string issue-number))) + (issue-created-relative-date issue) + (cyan (issue-creator issue)) + (issue-title issue) + (match (issue-keywords issue) + (() "") + (keywords + (blue + (string-append " [" + (string-join keywords ", ") + "]")))) + (match (issue-assigned issue) + (() "") + (assignees + (magenta (string-append " (assigned: " + (string-join assignees ", ") + ")")))))) + (define gnbug-list (match-lambda* (("--help") @@ -305,24 +326,7 @@ List issues. (issue-assigned issue))))))) (tlog (match-lambda* ((_ (index . issue)) - (format #t "~a ~a ~a ~a~a~a~%" - (magenta (string-append "#" (number->string index))) - (issue-created-relative-date issue) - (cyan (issue-creator issue)) - (issue-title issue) - (match (issue-keywords issue) - (() "") - (keywords - (blue - (string-append " [" - (string-join keywords ", ") - "]")))) - (match (issue-assigned issue) - (() "") - (assignees - (magenta (string-append " (assigned: " - (string-join assignees ", ") - ")"))))))))) + (print-issue index issue))))) rcount (issues))))))) |