mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 13:55:54 +03:00
first part of webhook handling in gh
This commit is contained in:
parent
9b1c3a8dd7
commit
b43f88e18c
19
ape/gh.hoon
19
ape/gh.hoon
@ -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]
|
||||
--
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user