Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Store number of additions and deletions on a Pull Request #84

Merged
merged 1 commit into from

2 participants

@dialelo

I've noticed that the Pull Request instances don't store the number of
additions and deletions and I've added it since the GitHub API returns
those numbers in the response.

@dialelo dialelo closed this
@dialelo

Apparently the additions and deletions are not returned in the payload anymore, although the docs
aren't updated.

@sigmavirus24
@dialelo

Yes, I summed up the additions and deletions for each PullFile.

@sigmavirus24

Actually, did you test it on a PullRequest object returned from an iter_ method or on one you requested with a specific number? The latter should have it, not the former.

@sigmavirus24 sigmavirus24 reopened this
@sigmavirus24 sigmavirus24 merged commit 5b0f802 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 0 deletions.
  1. +4 −0 github3/pulls.py
View
4 github3/pulls.py
@@ -81,6 +81,10 @@ def __init__(self, pull, session=None):
self.body_html = pull.get('body_html', '')
#: Body of the pull request as plain text
self.body_text = pull.get('body_text', '')
+ #: Number of additions on this pull request
+ self.additions = pull.get('additions')
+ #: Number of deletions on this pull request
+ self.deletions = pull.get('deletions')
# If the pull request has been closed
#: datetime object representing when the pull was closed
Something went wrong with that request. Please try again.