diff --git a/lib/platform/github/index.js b/lib/platform/github/index.js index 0c32a62c1361a6cceeee37ed19e9c8ffb4428c44..af1d74cf446dfc1d0a40ae0879612dc41678b2ae 100644 --- a/lib/platform/github/index.js +++ b/lib/platform/github/index.js @@ -849,7 +849,13 @@ async function ensureComment(issueNo, topic, content) { } return true; } catch (err) /* istanbul ignore next */ { - logger.warn({ err }, 'Error ensuring comment'); + if ( + err.message === 'Unable to create comment because issue is locked. (403)' + ) { + logger.info('Issue is locked - cannot add comment'); + } else { + logger.warn({ err }, 'Error ensuring comment'); + } return false; } } @@ -868,7 +874,13 @@ async function ensureCommentRemoval(issueNo, topic) { await deleteComment(commentId); } } catch (err) /* istanbul ignore next */ { - logger.warn({ err }, 'Error ensuring comment removal'); + if ( + err.message === 'Unable to create comment because issue is locked. (403)' + ) { + logger.info('Issue is locked - cannot add comment'); + } else { + logger.warn({ err }, 'Error ensuring comment removal'); + } } }