diff options
author | 2012-03-04 18:27:50 +0100 | |
---|---|---|
committer | 2012-03-04 18:27:50 +0100 | |
commit | b9ad335335f9562d5cf033783b41fe40dd6efc03 (patch) | |
tree | b7d381b753eef33db0d71a1777720806e80ade03 /pygithub3/resources/repos.py | |
parent | Refactor result. Now it's a package (diff) | |
download | python-github3-b9ad335335f9562d5cf033783b41fe40dd6efc03.tar.xz python-github3-b9ad335335f9562d5cf033783b41fe40dd6efc03.zip |
Get repository's commits supported with new result
Diffstat (limited to 'pygithub3/resources/repos.py')
-rw-r--r-- | pygithub3/resources/repos.py | 17 |
1 files changed, 8 insertions, 9 deletions
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 '<Committer (%s)>' % 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 '<GitCommit (%s:%s)>' % (getattr(self, 'sha', ''), - getattr(self, 'message', '')) + return '<Commit (%s)>' % getattr(self, 'author', '') class Stats(Resource): @@ -60,14 +59,14 @@ class File(Resource): return '<File (%s)>' % 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 '<Commit (%s)>' % getattr(self, 'author', '') + return '<GitCommit (%s)>' % getattr(self, 'sha', '') class Comment(Resource): |