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)] [%them wire (unit hiss)]
== ==
-- --
|_ [hid=bowl cnt=@ hook=_`(unit ,@t)``'6998961'] |_ [hid=bowl cnt=@ hook=(unit ,@t)]
++ prep ,_`.
++ gh ++ gh
|_ [style=@tas pax=path] |_ [style=@tas pax=path]
++ real-pax (scan "https://api.github.com{<`path`pax>}" auri:epur) ++ 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)) events/a/(turn `(list ,@t)`t.t.pax |=(a=@t s/a))
:- %config :- %config
%- jobe :~ %- 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] [%'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 ++ peer-scry-x
|= pax=path |= pax=path
^- [(list move) _+>.$] ^- [(list move) _+>.$]
@ -88,6 +98,5 @@
++ peek ++ peek
|= [ren=@tas tyl=path] |= [ren=@tas tyl=path]
^- (unit (unit (pair mark ,*))) ^- (unit (unit (pair mark ,*)))
~ ~ ::``noun/[ren tyl]
::``noun/[ren tyl]
-- --

View File

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