Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

complete repos-repo api

  • Loading branch information...
commit 275bd60b8a356404327530f72533ff367cb4fdc0 1 parent 5cddda6
@tarsius tarsius authored
Showing with 20 additions and 4 deletions.
  1. +20 −4 gh-repos.el
View
24 gh-repos.el
@@ -66,24 +66,33 @@
(git-url :initarg :git-url)
(ssh-url :initarg :ssh-url)
(svn-url :initarg :svn-url)
+ (mirror-url :initarg :mirror-url)
(owner :initarg :owner :initform nil)
(language :initarg :language)
(fork :initarg :fork)
(forks :initarg :forks)
(watchers :initarg :watchers)
(size :initarg :size)
+ (master-branch :initarg :master-branch)
(open-issues :initarg :open-issues)
(pushed-at :initarg :pushed-at)
(created-at :initarg :created-at)
-
- (owner-cls :allocation :class :initform gh-user))
+ (updated-at :initarg :updated-at)
+ (organisation :initarg :organisation :initform nil)
+ (parent :initarg :parent)
+ (source :initarg :source)
+
+ (owner-cls :allocation :class :initform gh-user)
+ (organisation-cls :allocation :class :initform gh-user)
+ (parent-cls :allocation :class :initform gh-repos-repo)
+ (source-cls :allocation :class :initform gh-repos-repo))
"Class for GitHub repositories")
(defmethod gh-object-read-into ((repo gh-repos-repo) data)
(call-next-method)
(with-slots (url html-url clone-url git-url ssh-url svn-url
owner language fork forks watchers size open-issues
- pushed-at created-at)
+ pushed-at created-at organisation parent source)
repo
(setq url (gh-read data 'url)
html-url (gh-read data 'html_url)
@@ -101,7 +110,14 @@
size (gh-read data 'size)
open-issues (gh-read data 'open_issues)
pushed-at (gh-read data 'pushed_at)
- created-at (gh-read data 'created_at))))
+ created-at (gh-read data 'created_at)
+ organisation (gh-object-read (or (oref repo :organisation)
+ (oref repo organisation-cls))
+ (gh-read data 'organisation))
+ parent (gh-object-read (oref repo parent-cls)
+ (gh-read data 'parent))
+ source (gh-object-read (oref repo source-cls)
+ (gh-read data 'source)))))
(defclass gh-repos-ref (gh-object)
((label :initarg :label)
Please sign in to comment.
Something went wrong with that request. Please try again.