From b9ad335335f9562d5cf033783b41fe40dd6efc03 Mon Sep 17 00:00:00 2001 From: David Medina Date: Sun, 4 Mar 2012 18:27:50 +0100 Subject: Get repository's commits supported with new result --- pygithub3/resources/repos.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'pygithub3/resources/repos.py') diff --git a/pygithub3/resources/repos.py b/pygithub3/resources/repos.py index 9d8ebf6..c7ec5e8 100644 --- a/pygithub3/resources/repos.py +++ b/pygithub3/resources/repos.py @@ -40,14 +40,13 @@ class Committer(Resource): return '' % getattr(self, 'name', '') -class GitCommit(Resource): +class Commit(Resource): - _maps = {'author': Author, 'committer': Committer, 'tree': 'self'} - _collection_maps = {'parents': 'self'} + _maps = {'author': Author, 'committer': Committer} + #_maps.update({'tree': GitCommit}) def __str__(self): - return '' % (getattr(self, 'sha', ''), - getattr(self, 'message', '')) + return '' % getattr(self, 'author', '') class Stats(Resource): @@ -60,14 +59,14 @@ class File(Resource): return '' % getattr(self, 'filename', '') -class Commit(Resource): +class GitCommit(Resource): - _maps = {'commit': GitCommit, 'author': User, 'committer': User, + _maps = {'author': User, 'committer': User, 'commit': Commit, 'stats': Stats} - _collection_maps = {'parents': GitCommit, 'files': File} + _collection_maps = {'parents': 'self', 'files': File} def __str__(self): - return '' % getattr(self, 'author', '') + return '' % getattr(self, 'sha', '') class Comment(Resource): -- cgit v1.2.3-59-g8ed1b