shrub/mar/gh/issues.hoon

140 lines
3.8 KiB
Plaintext
Raw Normal View History

2016-01-28 00:50:06 +03:00
:: Converts the result of an 'issues' event into a issues:gh.
2016-01-26 04:13:08 +03:00
/- gh
2016-03-25 01:42:39 +03:00
/+ gh-parse, talk
|_ issues/issues:gh
2016-03-25 01:42:39 +03:00
++ grow
|%
++ talk-speeches
^- (list speech:talk)
:_ ~
2016-03-26 03:47:22 +03:00
=+ ^= txt
2016-03-25 01:42:39 +03:00
?- -.action.issues
$assigned
;: (cury cat 3)
'assigned issue #'
2016-03-25 02:55:10 +03:00
(rsh 3 2 (scot %ui number.issue.issues))
2016-03-25 01:42:39 +03:00
' to '
login.assignee.action.issues
' ('
title.issue.issues
')'
==
::
$unassigned
;: (cury cat 3)
'unassigned issue #'
2016-03-25 02:55:10 +03:00
(rsh 3 2 (scot %ui number.issue.issues))
2016-03-25 01:42:39 +03:00
' from '
login.assignee.action.issues
' ('
title.issue.issues
')'
==
::
$labeled
;: (cury cat 3)
'labeled issue #'
2016-03-25 02:55:10 +03:00
(rsh 3 2 (scot %ui number.issue.issues))
2016-03-25 01:42:39 +03:00
' as '
name.label.action.issues
' ('
title.issue.issues
')'
==
::
$unlabeled
;: (cury cat 3)
'unlabeled issue #'
2016-03-25 02:55:10 +03:00
(rsh 3 2 (scot %ui number.issue.issues))
2016-03-25 01:42:39 +03:00
' as '
name.label.action.issues
' ('
title.issue.issues
')'
==
::
$opened
;: (cury cat 3)
'opened issue #'
2016-03-25 02:55:10 +03:00
(rsh 3 2 (scot %ui number.issue.issues))
2016-03-25 01:42:39 +03:00
': '
title.issue.issues
==
::
$closed
;: (cury cat 3)
'closed issue #'
2016-03-25 02:55:10 +03:00
(rsh 3 2 (scot %ui number.issue.issues))
2016-03-25 01:42:39 +03:00
': '
title.issue.issues
==
::
$reopened
;: (cury cat 3)
'reopened issue #'
2016-03-25 02:55:10 +03:00
(rsh 3 2 (scot %ui number.issue.issues))
2016-03-25 01:42:39 +03:00
': '
title.issue.issues
==
==
2016-04-09 02:47:34 +03:00
^- speech:talk
2016-03-26 03:47:22 +03:00
:* %api %github
login.sender.issues
2016-04-09 02:47:34 +03:00
(rash html-url.sender.issues aurf:epur)
2016-03-26 03:47:22 +03:00
txt txt
2016-04-09 02:47:34 +03:00
(rash html-url.issue.issues aurf:epur)
2016-03-26 03:47:22 +03:00
%- jobe
%+ welp
:~ repository+s+name.repository.issues
number+(jone number.issue.issues)
title+s+title.issue.issues
action+s+-.action.issues
==
?- -.action.issues
$assigned
:~ assignee+s+login.assignee.action.issues
assignee-url+s+url.assignee.action.issues
==
::
$unassigned
:~ assignee+s+login.assignee.action.issues
assignee-url+s+url.assignee.action.issues
==
::
$labeled
:~ label+s+name.label.action.issues
==
::
$unlabeled
:~ label+s+name.label.action.issues
==
::
$opened ~
$closed ~
$reopened ~
==
2016-03-25 01:42:39 +03:00
==
--
2016-01-26 04:13:08 +03:00
++ grab
|%
++ json
|= jon/^json
2016-01-26 04:13:08 +03:00
^- issues:gh
=+ top=(need ((om:jo some) jon))
:* (need (repository:gh-parse (~(got by top) %repository)))
(need (user:gh-parse (~(got by top) %sender)))
=+ action=(need (so:jo (~(got by top) %action)))
?+ action ~|([%bad-action action] !!)
$assigned [action (need (user:gh-parse (~(got by top) %assignee)))]
$unassigned [action (need (user:gh-parse (~(got by top) %assignee)))]
$labeled [action (need (label:gh-parse (~(got by top) %label)))]
$unlabeled [action (need (label:gh-parse (~(got by top) %label)))]
$opened [action ~]
$closed [action ~]
$reopened [action ~]
2016-01-26 04:13:08 +03:00
==
(need (issue:gh-parse (~(got by top) %issue)))
==
--
--