first part of webhook handling in gh

This commit is contained in:
Philip C Monk 2016-01-20 19:49:13 -05:00
parent 9b1c3a8dd7
commit b43f88e18c
2 changed files with 15 additions and 6 deletions

View File

@ -9,8 +9,7 @@
[%them wire (unit hiss)]
==
--
|_ [hid=bowl cnt=@ hook=_`(unit ,@t)``'6998961']
++ prep ,_`.
|_ [hid=bowl cnt=@ hook=(unit ,@t)]
++ gh
|_ [style=@tas pax=path]
++ real-pax (scan "https://api.github.com{<`path`pax>}" auri:epur)
@ -44,7 +43,7 @@
events/a/(turn `(list ,@t)`t.t.pax |=(a=@t s/a))
:- %config
%- jobe :~
[%url s/'http://107.170.195.5']
[%url s/'http://107.170.195.5:8445/~/to/gh/json.json?anon&wire=/']
[%'content_type' s/%json]
==
==
@ -62,6 +61,17 @@
==
--
::
++ poke-json
|= jon=json
^- [(list move) _+>.$]
=+ ^- [repo=json sender=json hok=json hook-id=@t zen=json]
%- need
%. jon
=> jo
(ot repository/some sender/some hook/some 'hook_id'^no zen/some ~)
~& [%id hook-id]
[~ +>.$(hook `hook-id)]
::
++ peer-scry-x
|= pax=path
^- [(list move) _+>.$]
@ -88,6 +98,5 @@
++ peek
|= [ren=@tas tyl=path]
^- (unit (unit (pair mark ,*)))
~
::``noun/[ren tyl]
~ ::``noun/[ren tyl]
--

View File

@ -635,7 +635,7 @@
++ ap-peek
|= [ren=@tas tyl=path]
^- (unit (unit cage))
=+ cug=(ap-find %peek tyl)
=+ cug=(ap-find %peek ren tyl)
?~ cug
((slog leaf/"peek find fail" >tyl< ~) [~ ~])
=^ arm +>.$ (ap-farm q.u.cug)