diff --git a/pkg/arvo/gen/hood/story-remove.hoon b/pkg/arvo/gen/hood/story-remove.hoon index 400aeb6df..da8c268b4 100644 --- a/pkg/arvo/gen/hood/story-remove.hoon +++ b/pkg/arvo/gen/hood/story-remove.hoon @@ -5,7 +5,7 @@ /- *story :- %say |= $: [now=@da eny=@uvJ bec=beak] - [[syd=desk ~] cas=case prz=prose ~] + [[syd=desk ~] cas=cash prz=prose ~] == :: :: XX: story set and story init both have desk and case as optional. @@ -15,7 +15,12 @@ :: leaning towards no, and potentially even making the case non-optional =/ our p.bec =? cas =(*case cas) da+now :: use current commit if cas not provided -=/ tak .^(tako:clay %cs /(scot %p our)/[syd]/(scot cas)/tako/~) + +=/ tak + ?: ?=([%tako tako:clay] cas) + p.cas + .^(tako:clay %cs /(scot %p our)/[desk]/(scot cas)/tako/~) +:: =/ tale=story .^(story %cx /(scot %p our)/[syd]/(scot %da now)/story) =. tale ?: =(*prose prz) diff --git a/pkg/arvo/gen/hood/story-set.hoon b/pkg/arvo/gen/hood/story-set.hoon index 30c909505..61c93b128 100644 --- a/pkg/arvo/gen/hood/story-set.hoon +++ b/pkg/arvo/gen/hood/story-set.hoon @@ -5,20 +5,21 @@ /- *story :- %say |= $: [now=@da eny=@uvJ bec=beak] - [[=prose ~] =desk cas=case ~] + [[=prose ~] =desk cas=cash ~] == -:: -:: -:: =/ our p.bec =? desk =(*^desk desk) q.bec :: use current desk if user didn't provide ?: !(~(has in .^((set ^desk) %cd /(scot %p our)/$/(scot %da now))) desk) ~& >> "Error: desk {} does not exist." helm-pass+[%d %noop ~] =? cas =(*case cas) da+now :: use current commit if cas not provided - -=/ tak .^(tako:clay %cs /(scot %p our)/[desk]/(scot cas)/tako/~) -=/ tale=story .^(story %cx /(scot %p our)/[desk]/(scot %da now)/story) -=. tale (~(put ju tale) tak prose) +:: TODO case existence check +=/ tak + ?: ?=([%tako tako:clay] cas) + p.cas + .^(tako:clay %cs /(scot %p our)/[desk]/(scot cas)/tako/~) +:: +=/ tale=story .^(story %cx /(scot %p our)/[desk]/(scot %da now)/story) +=. tale (~(put ju tale) tak prose) :- %helm-pass [%c [%info desk %& [/story %ins story+!>(tale)]~]] \ No newline at end of file