Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/77859


Change subject: Pull data from github via API anyway, rather than use payload 
from push
......................................................................

Pull data from github via API anyway, rather than use payload from push

This has an extra network request overhead, but I think it is *okay*,
since it will be now more easily reproducible

Change-Id: Iab8cdf5ac6843406b9e962526667c08f0dd585f6
---
M src/github-to-gerrit.py
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/SuchABot 
refs/changes/59/77859/1

diff --git a/src/github-to-gerrit.py b/src/github-to-gerrit.py
index 7423675..c9efc20 100644
--- a/src/github-to-gerrit.py
+++ b/src/github-to-gerrit.py
@@ -83,8 +83,7 @@
         logger.info("git review setup")
 
 
-def get_pullreq(name, number):
-    gh_name = name.replace('/', '-')
+def get_pullreq(gh_name, number):
     pr = gh.repos(OWNER, gh_name).pulls(number).get()
     return pr
 
@@ -167,4 +166,5 @@
 
     while True:
         data = json.loads(red.brpop(QUEUE_KEY)[1])
-        do_review(data)
+        pr = get_pullreq(data['base']['repo']['name'], data['number'])
+        do_review(pr)

-- 
To view, visit https://gerrit.wikimedia.org/r/77859
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab8cdf5ac6843406b9e962526667c08f0dd585f6
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/SuchABot
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to