aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/resources/pull_requests.py
diff options
context:
space:
mode:
authorNat Williams <nwilliams@leapfrogonline.com>2012-04-17 17:35:31 -0500
committerNat Williams <nwilliams@leapfrogonline.com>2012-04-17 17:35:31 -0500
commit4539f80aa44e500422c5071d8e3d74de321b6225 (patch)
tree2efa8b3e2eaa19de229209b6d316e098944399d2 /pygithub3/resources/pull_requests.py
parentmore specific exception for missing Request classes (diff)
downloadpython-github3-4539f80aa44e500422c5071d8e3d74de321b6225.tar.xz
python-github3-4539f80aa44e500422c5071d8e3d74de321b6225.zip
add pull request API
there are a few little issues remaining. Mostly regarding handling meaningful non-20x response codes
Diffstat (limited to 'pygithub3/resources/pull_requests.py')
-rw-r--r--pygithub3/resources/pull_requests.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/pygithub3/resources/pull_requests.py b/pygithub3/resources/pull_requests.py
new file mode 100644
index 0000000..1fe2623
--- /dev/null
+++ b/pygithub3/resources/pull_requests.py
@@ -0,0 +1,20 @@
+from .base import Resource
+
+
+class PullRequest(Resource):
+ _dates = ('created_at', 'updated_at', 'closed_at', 'merged_at')
+
+ def __str__(self):
+ return '<PullRequest (%s)>' % getattr(self, 'title', '')
+
+
+class File(Resource):
+ def __str__(self):
+ return '<File (%s)>' % getattr(self, 'filename', '')
+
+
+class Comment(Resource):
+ _dates = ('created_at', 'updated_at')
+
+ def __str__(self):
+ return '<Comment (#%s)>' % getattr(self, 'id', '')