2022-02-19 01:40:55 +03:00
|
|
|
:: story: Attach a commit message to the commit associated with a given case on a given desk
|
2021-11-27 04:53:20 +03:00
|
|
|
::
|
|
|
|
::::
|
|
|
|
::
|
2022-01-30 23:58:35 +03:00
|
|
|
/- *story
|
2021-11-27 04:53:20 +03:00
|
|
|
:- %say
|
|
|
|
|= $: [now=@da eny=@uvJ bec=beak]
|
2022-02-19 01:49:17 +03:00
|
|
|
[[=prose ~] =desk cas=cash ~]
|
2021-11-27 04:53:20 +03:00
|
|
|
==
|
2022-02-06 04:44:26 +03:00
|
|
|
=/ our p.bec
|
|
|
|
=? desk =(*^desk desk) q.bec :: use current desk if user didn't provide
|
2022-02-19 02:20:17 +03:00
|
|
|
=? cas =(*case cas) r.bec :: use case from beak if cas not provided
|
2022-02-11 21:08:16 +03:00
|
|
|
?: !(~(has in .^((set ^desk) %cd /(scot %p our)/$/(scot %da now))) desk)
|
|
|
|
~& >> "Error: desk {<desk>} does not exist."
|
|
|
|
helm-pass+[%d %noop ~]
|
2022-02-19 01:49:17 +03:00
|
|
|
:: TODO case existence check
|
|
|
|
=/ tak
|
|
|
|
?: ?=([%tako tako:clay] cas)
|
|
|
|
p.cas
|
|
|
|
.^(tako:clay %cs /(scot %p our)/[desk]/(scot cas)/tako/~)
|
|
|
|
::
|
2022-02-19 02:20:17 +03:00
|
|
|
=/ pax /(scot %p our)/[desk]/(scot cas)/story
|
|
|
|
?. .^(? %cu pax) tang+['Error: No story file found. Please use |story-init to create one.' ~]
|
|
|
|
=/ tale=story .^(story %cx /(scot %p our)/[desk]/(scot %da now)/story)
|
|
|
|
=. tale (~(put ju tale) tak prose)
|
2021-11-27 04:53:20 +03:00
|
|
|
:- %helm-pass
|
2022-02-06 04:44:26 +03:00
|
|
|
[%c [%info desk %& [/story %ins story+!>(tale)]~]]
|