logs: log comment title

This commit is contained in:
Rhys Arkins 2019-08-15 06:15:53 +02:00
parent c86ae327e2
commit 2590f4eb1b
3 changed files with 12 additions and 3 deletions

View file

@ -618,7 +618,10 @@ export async function ensureComment(
} }
if (!commentId) { if (!commentId) {
await addComment(prNo, body); await addComment(prNo, body);
logger.info({ repository: config.repository, prNo }, 'Comment added'); logger.info(
{ repository: config.repository, prNo, topic },
'Comment added'
);
} else if (commentNeedsUpdating) { } else if (commentNeedsUpdating) {
await editComment(prNo, commentId, body); await editComment(prNo, commentId, body);
logger.info({ repository: config.repository, prNo }, 'Comment updated'); logger.info({ repository: config.repository, prNo }, 'Comment updated');

View file

@ -83,7 +83,10 @@ export async function ensureComment(
} }
if (!commentId) { if (!commentId) {
await addComment(config, prNo, body); await addComment(config, prNo, body);
logger.info({ repository: config.repository, prNo }, 'Comment added'); logger.info(
{ repository: config.repository, prNo, topic },
'Comment added'
);
} else if (commentNeedsUpdating) { } else if (commentNeedsUpdating) {
await editComment(config, prNo, commentId, body); await editComment(config, prNo, commentId, body);
logger.info({ repository: config.repository, prNo }, 'Comment updated'); logger.info({ repository: config.repository, prNo }, 'Comment updated');

View file

@ -1043,7 +1043,10 @@ export async function ensureComment(
} }
if (!commentId) { if (!commentId) {
await addComment(issueNo, body); await addComment(issueNo, body);
logger.info({ repository: config.repository, issueNo }, 'Comment added'); logger.info(
{ repository: config.repository, issueNo, topic },
'Comment added'
);
} else if (commentNeedsUpdating) { } else if (commentNeedsUpdating) {
await editComment(commentId, body); await editComment(commentId, body);
logger.info( logger.info(