aboutsummaryrefslogtreecommitdiff
path: root/modules/git_webhooks
diff options
context:
space:
mode:
authorGravatar jesopo2019-11-26 13:41:40 +0000
committerGravatar jesopo2019-11-26 13:42:01 +0000
commit2d21dfa22931bdb887ccccba4a33e6fa4755e94b (patch)
tree6ef5e304e3e9a69f9afd66ac0bee4d98ec115399 /modules/git_webhooks
parentremove all `eagle` stuff from nr.py (diff)
signature
utils.http.Response.data should always be `bytes` - add .decode and .soup
Diffstat (limited to 'modules/git_webhooks')
-rw-r--r--modules/git_webhooks/github.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/git_webhooks/github.py b/modules/git_webhooks/github.py
index 5a252c65..b7f13805 100644
--- a/modules/git_webhooks/github.py
+++ b/modules/git_webhooks/github.py
@@ -171,7 +171,7 @@ class GitHub(object):
self.log.debug("git.io shortening: %s" % url)
try:
page = utils.http.request("https://git.io", method="POST",
- post_data={"url": url}, detect_encoding=False)
+ post_data={"url": url})
return page.headers["Location"]
except utils.http.HTTPTimeoutException:
self.log.warn(
@@ -294,11 +294,11 @@ class GitHub(object):
action_desc = "committed to %s" % number
commits_url = data["pull_request"]["commits_url"]
- commits = utils.http.request(commits_url, json=True)
+ commits = utils.http.request(commits_url).json()
if commits:
seen_before = False
new_commits = []
- for commit in commits.data:
+ for commit in commits:
if seen_before:
new_commits.append({"id": commit["sha"],
"message": commit["commit"]["message"]})