From 0bc2953113e2b0c3500b1bb13385cbef58cb9e3f Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@keylocation.sg>
Date: Wed, 8 Nov 2017 13:26:55 +0100
Subject: [PATCH] fix: lock file stderr was not being included in pr comments
 (#1122)

---
 lib/workers/branch/index.js | 11 ++++-------
 lib/workers/branch/yarn.js  |  2 --
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js
index 7185c8ced6..9d9588bd74 100644
--- a/lib/workers/branch/index.js
+++ b/lib/workers/branch/index.js
@@ -153,15 +153,12 @@ async function processBranch(branchConfig) {
           content +=
             'you rename then delete this PR unmerged, so that it can be regenerated.';
         }
-        content += '\n\nThe output from `stderr` is included below:';
-        const subtopics = [];
+        content += '\n\nThe output from `stderr` is included below:\n\n';
         config.lockFileErrors.forEach(error => {
-          subtopics.push({
-            topic: error.lockFile,
-            content: `\`\`\`\n${error.stderr}\n\`\`\``,
-          });
+          content += `##### ${error.lockFile}\n\n`;
+          content += `\`\`\`\n${error.stderr}\n\`\`\`\n\n`;
         });
-        await platform.ensureComment(pr.number, topic, content, subtopics);
+        await platform.ensureComment(pr.number, topic, content);
       } else {
         await platform.ensureCommentRemoval(pr.number, topic);
         const prAutomerged = await prWorker.checkAutoMerge(pr, config);
diff --git a/lib/workers/branch/yarn.js b/lib/workers/branch/yarn.js
index 7f7109490e..a6cc44c88b 100644
--- a/lib/workers/branch/yarn.js
+++ b/lib/workers/branch/yarn.js
@@ -75,8 +75,6 @@ async function generateLockFile(tmpDir) {
     logger.info(
       {
         err,
-        stdout,
-        stderr,
       },
       'yarn install error'
     );
-- 
GitLab