From 242e2e34c6d280481dec7da727aa4ad8577dabaf Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Thu, 14 Dec 2017 21:39:23 +0100
Subject: [PATCH] fix: query parent repo for issue comments if forking

---
 lib/platform/github/index.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/platform/github/index.js b/lib/platform/github/index.js
index 91be8936dc..16da633074 100644
--- a/lib/platform/github/index.js
+++ b/lib/platform/github/index.js
@@ -461,9 +461,8 @@ async function addLabels(issueNo, labels) {
 async function getComments(issueNo) {
   // GET /repos/:owner/:repo/issues/:number/comments
   logger.debug(`Getting comments for #${issueNo}`);
-  const url = `repos/${
-    config.repoName
-  }/issues/${issueNo}/comments?per_page=100`;
+  const url = `repos/${config.parentRepo ||
+    config.repoName}/issues/${issueNo}/comments?per_page=100`;
   const comments = (await get(url, { paginate: true })).body;
   logger.debug(`Found ${comments.length} comments`);
   return comments;
-- 
GitLab