aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/resources/issues.py
diff options
context:
space:
mode:
authorAlejandro Gómez <alejandroogomez@gmail.com>2012-05-17 22:41:59 +0200
committerAlejandro Gómez <alejandroogomez@gmail.com>2012-05-27 19:54:29 +0200
commita83b53bbb807aa01b490ca56e186e69e4befc08c (patch)
treefab5edc774b8d2abe0e35b24071a959d1252773e /pygithub3/resources/issues.py
parentadd build/ to .gitignore (diff)
downloadpython-github3-a83b53bbb807aa01b490ca56e186e69e4befc08c.tar.xz
python-github3-a83b53bbb807aa01b490ca56e186e69e4befc08c.zip
add Pull Request to `Issue` resources
Diffstat (limited to 'pygithub3/resources/issues.py')
-rw-r--r--pygithub3/resources/issues.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/pygithub3/resources/issues.py b/pygithub3/resources/issues.py
index af7547f..69f905a 100644
--- a/pygithub3/resources/issues.py
+++ b/pygithub3/resources/issues.py
@@ -5,9 +5,11 @@ import re
from .base import Resource
from .users import User
+from .pull_requests import PullRequest
class Label(Resource):
+
@staticmethod
def is_valid_color(color):
valid_color = re.compile(r'[0-9abcdefABCDEF]{6}')
@@ -21,6 +23,7 @@ class Label(Resource):
class Milestone(Resource):
+
_dates = ('created_at', 'due_on')
_maps = {'creator': User}
@@ -30,8 +33,15 @@ class Milestone(Resource):
class Issue(Resource):
- _dates = ('created_at', 'updated_at')
- _maps = {'assignee': User, 'user': User}
+ _dates = ('created_at', 'updated_at', 'closed_at')
+ _maps = {
+ 'assignee': User,
+ 'user': User,
+ 'milestone': Milestone,
+ 'pull_request': PullRequest
+ }
+
+ _collection_maps = {'labels': Label}
def __str__(self):
return '<Issue (%s)>' % getattr(self, 'number', '')