Expanded on existing Github code by adding commit and repository marks.

This commit is contained in:
Fang 2017-11-15 17:33:08 +01:00
parent b19ba4df49
commit d0a0d6cf51
4 changed files with 84 additions and 0 deletions

View File

@ -79,6 +79,19 @@
'watchers'^ni
'default_branch'^so
==
++ commit
^- $-(json (unit commit:gh))
=+ jo
%- ot :~
'sha'^so
'url'^so
'author'^author
'committer'^author
'message'^so
'tree'^point
'parents'^(ar point)
'verification'^verification
==
++ user
^- $-(json (unit user:gh))
=+ jo
@ -128,6 +141,30 @@
'closed_at'^(mu so)
'body'^so
==
++ author
^- $-(json (unit author:gh))
=+ jo
%- ot :~
'date'^so
'name'^so
'email'^so
==
++ point
^- $-(json (unit point:gh))
=+ jo
%- ot :~
'url'^so
'sha'^so
==
++ verification
^- $-(json (unit verification:gh))
=+ jo
%- ot :~
'verified'^bo
'reason'^so
'signature'^(mu so)
'payload'^(mu so)
==
++ label
^- $-(json (unit label:gh))
=+ jo

11
mar/gh/commit.hoon Normal file
View File

@ -0,0 +1,11 @@
/- gh
/+ gh-parse, httr-to-json, old-zuse
=, old-zuse
|_ commit/commit:gh
++ grab
|%
++ noun commit:gh
++ httr (cork httr-to-json json)
++ json commit:gh-parse
--
--

11
mar/gh/repository.hoon Normal file
View File

@ -0,0 +1,11 @@
/- gh
/+ gh-parse, httr-to-json, old-zuse
=, old-zuse
|_ repo/repository:gh
++ grab
|%
++ noun repository:gh
++ httr (cork httr-to-json json)
++ json repository:gh-parse
--
--

View File

@ -77,6 +77,16 @@
watchers/@ud
default-branch/@t
==
++ commit
$: sha/@t
url/@t
author/author
committer/author
message/@t
tree/point
parents/(list point)
verification/verification
==
++ user
$: login/@t
id/id
@ -118,6 +128,21 @@
closed-at/(unit time)
body/@t
==
++ author
$: date/@t
name/@t
email/@t
==
++ point
$: url/@t
sha/@t
==
++ verification
$: verified/?
reason/@t
signature/(unit @t)
payload/(unit @t)
==
++ label
$: url/@t
name/@t