From c488a674cac8d22edc03c7acb22429ef112b674f Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Fri, 23 Aug 2019 05:51:38 +0200
Subject: [PATCH] refactor: add better logging for bitbucket issue creation

---
 lib/platform/bitbucket-server/index.ts | 1 +
 lib/platform/bitbucket/index.ts        | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/platform/bitbucket-server/index.ts b/lib/platform/bitbucket-server/index.ts
index 7453a55b2e..768c2e91d1 100644
--- a/lib/platform/bitbucket-server/index.ts
+++ b/lib/platform/bitbucket-server/index.ts
@@ -460,6 +460,7 @@ export /* istanbul ignore next */ function ensureIssue(
   body: string
 ) {
   logger.debug(`ensureIssue(${title}, body={${body}})`);
+  logger.warn({ title }, 'Cannot ensure issue');
   // TODO: Needs implementation
   // This is used by Renovate when creating its own issues, e.g. for deprecated package warnings, config error notifications, or "masterIssue"
   // BB Server doesnt have issues
diff --git a/lib/platform/bitbucket/index.ts b/lib/platform/bitbucket/index.ts
index bbbe9d1838..bda82bb554 100644
--- a/lib/platform/bitbucket/index.ts
+++ b/lib/platform/bitbucket/index.ts
@@ -358,6 +358,7 @@ export async function ensureIssue(title: string, body: string) {
   /* istanbul ignore if */
   if (!config.has_issues) {
     logger.warn('Issues are disabled');
+    logger.info({ title, body }, 'Failed to ensure Issue');
     return null;
   }
   try {
-- 
GitLab