From f8a418f82aa83b431da00bde7cf8b6622116f644 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Sat, 16 May 2020 09:11:04 +0200
Subject: [PATCH] fix(github): better detection of locked PR

Closes #6215
---
 lib/platform/github/index.ts | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/platform/github/index.ts b/lib/platform/github/index.ts
index 5a1a47f5d2..3ad40973f2 100644
--- a/lib/platform/github/index.ts
+++ b/lib/platform/github/index.ts
@@ -1552,9 +1552,7 @@ export async function ensureComment({
     if (err.message === PLATFORM_FAILURE) {
       throw err;
     }
-    if (
-      err.message === 'Unable to create comment because issue is locked. (403)'
-    ) {
+    if (err.body?.message?.includes('is locked')) {
       logger.debug('Issue is locked - cannot add comment');
     } else {
       logger.warn({ err }, 'Error ensuring comment');
-- 
GitLab