From 7e78353ce45ad2e32637d69d7edf8fde700da55c Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Tue, 11 Aug 2020 08:21:44 +0200
Subject: [PATCH] fix: surround linkify in try/catch

---
 lib/workers/pr/changelog/release-notes.ts | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/workers/pr/changelog/release-notes.ts b/lib/workers/pr/changelog/release-notes.ts
index 861fc9ae62..0eb93fcf20 100644
--- a/lib/workers/pr/changelog/release-notes.ts
+++ b/lib/workers/pr/changelog/release-notes.ts
@@ -106,9 +106,13 @@ export async function getReleaseNotes(
       if (!releaseNotes.body.length) {
         releaseNotes = null;
       } else {
-        releaseNotes.body = linkify(releaseNotes.body, {
-          repository: `${baseUrl}${repository}`,
-        });
+        try {
+          releaseNotes.body = linkify(releaseNotes.body, {
+            repository: `${baseUrl}${repository}`,
+          });
+        } catch (err) /* istanbul ignore next */ {
+          logger.warn({ err, baseUrl, repository }, 'Error linkifying');
+        }
       }
     }
   });
-- 
GitLab