diff options
Diffstat (limited to 'pygithub3/resources/issues.py')
-rw-r--r-- | pygithub3/resources/issues.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pygithub3/resources/issues.py b/pygithub3/resources/issues.py new file mode 100644 index 0000000..ce5b304 --- /dev/null +++ b/pygithub3/resources/issues.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python +# -*- encoding: utf-8 -*- + +from .base import Resource +from .users import User + +class Issue(Resource): + + _dates = ('created_at', 'updated_at') + _maps = {'assignee': User} + + def __str__(self): + return '<Issue (%s)>' % getattr(self, 'number', '') + + +class Comment(Resource): + + _dates = ('created_at', 'update_at') + _maps = {'user': User} + + def __str__(self): + return '<Comment (%s)>' % (getattr(self, 'user', '')) + + +class Event(Resource): + + _dates = ('created_at', ) + _maps = {'actor': User} + + def __str__(self): + return '<Event (%s)>' % (getattr(self, 'commit_id', ''))
\ No newline at end of file |