Skip to content

Commit

Permalink
merging PR Chaosthebot#501: fix Patchset from requests
Browse files Browse the repository at this point in the history
Chaosthebot#501: fix Patchset from requests

Description:
Getting patch raise no error but was in fact empty.

:white_check_mark: PR passed with a vote of 7 for and 0 against, a weighted total of 7.0 and a threshold of 6.5, and a current meritocracy review.

Vote record:
@MUCHZER: 1
@PlasmaPower: 1
@Swizz: 1
@andrewda: 1
@e-beach: 1
@JustynC7: 1
@rhengles: 1
  • Loading branch information
Swizz authored and chaosbot committed Jun 4, 2017
1 parent fa27c4c commit b950705
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion github_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@ def __call__(self, method, path, **kwargs):
try:
data = resp.json()
except:
data = None
data = resp.text

return data
4 changes: 2 additions & 2 deletions github_api/prs.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,11 @@ def get_reactions_for_pr(api, urn, pr):

def get_patch(api, urn, pr_num, raw=False):
""" get the formatted or not patch file for a pr """
path = "/{urn}/pull/{pr}.patch".format(urn=urn, pr=pr_num)
path = "https://github.com/{urn}/pull/{pr}.patch".format(urn=urn, pr=pr_num)
data = api("get", path)
if raw:
return data
return PatchSet(data)
return PatchSet.from_string(data)


def post_accepted_status(api, urn, pr, voting_window, votes, total, threshold,
Expand Down

0 comments on commit b950705

Please sign in to comment.