From 8414e65e08eba8aae19b8d9de40b80f605957985 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Tue, 3 Jul 2018 17:50:36 -0700 Subject: [PATCH] Delete redundant code. _issue_to_pull_request(body) got the pr_body for us (with logging for failures, then we did it again in the calling context. We should only need to fetch this data once and doing it with logging is preferable. Remove the followup code that is redundant and rely on _issue_to_pull_request(body) instead. Change-Id: Iaa1eb4c4d992249504be02efd50c1192fcf99e49 --- zuul/driver/github/githubconnection.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/zuul/driver/github/githubconnection.py b/zuul/driver/github/githubconnection.py index 23fb2089cf..bab44cf8d3 100644 --- a/zuul/driver/github/githubconnection.py +++ b/zuul/driver/github/githubconnection.py @@ -318,9 +318,6 @@ class GithubEventConnector(threading.Thread): # Do not process non-PR issue comment return pr_body = self._issue_to_pull_request(body) - number = body.get('issue').get('number') - project_name = body.get('repository').get('full_name') - pr_body = self.connection.getPull(project_name, number) if pr_body is None: return