story: make desk an optional param in story-list

This commit is contained in:
Yaseen 2022-02-05 20:44:26 -05:00
parent 4a921ad68b
commit fc5c7d53ea

View File

@ -4,16 +4,17 @@
/- *story
:- %say
|= $: [now=@da eny=@uvJ bec=beak]
[[syd=desk ~] ~]
[[~] =desk ~]
==
::
:: (Internal) List all commit messages for the given desk,
:: including orphans (i.e. ones that have no connection to the file graph)
::
=/ our p.bec
=/ tale=story .^(story %cx /(scot %p our)/[syd]/(scot %da now)/story)
=/ story-to-mime .^($-(story mime) %cf /(scot %p our)/[syd]/(scot %da now)/story/mime)
=/ tale-mime (story-to-mime tale)
=/ tale-text `@t`q.q.tale-mime
=/ our p.bec
=? desk =(*^desk desk) q.bec :: use current desk if user didn't provide
=/ tale=story .^(story %cx /(scot %p our)/[desk]/(scot %da now)/story)
=/ story-to-mime .^($-(story mime) %cf /(scot %p our)/[desk]/(scot %da now)/story/mime)
=/ tale-mime (story-to-mime tale)
=/ tale-text `@t`q.q.tale-mime
:- %tang
[tale-text ~]