Use app integration to get PR reviews
According to
https://platform.github.community/t/api-endpoint-for-pr-reviews/409/21
the APP API can now list reviews. The docs have not yet been updated,
but testing locally seems to work.
Change-Id: I7219ddbc21cd58fed81181fab028d53f448b6489
Signed-off-by: Jesse Keating <omgjlk@us.ibm.com>
diff --git a/zuul/driver/github/githubconnection.py b/zuul/driver/github/githubconnection.py
index 5a40422..2191f95 100644
--- a/zuul/driver/github/githubconnection.py
+++ b/zuul/driver/github/githubconnection.py
@@ -859,10 +859,7 @@
def _getPullReviews(self, owner, project, number):
# make a list out of the reviews so that we complete our
# API transaction
- # reviews are not yet supported by integrations, use api_key:
- # https://platform.github.community/t/api-endpoint-for-pr-reviews/409
- github = self.getGithubClient("%s/%s" % (owner, project),
- use_app=False)
+ github = self.getGithubClient("%s/%s" % (owner, project))
reviews = [review.as_dict() for review in
github.pull_request(owner, project, number).reviews()]