From 5ca91ee9f6ff3c7d21f538e4bf40ec9924ee2bc9 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Thu, 21 Mar 2019 07:19:43 +0100 Subject: [PATCH] refactor: warn if github actions / gitfs bug found --- lib/platform/git/storage.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/platform/git/storage.js b/lib/platform/git/storage.js index a788c4e751..e131007d18 100644 --- a/lib/platform/git/storage.js +++ b/lib/platform/git/storage.js @@ -224,7 +224,13 @@ class Storage { logger.debug({ branchName }, 'Deleted remote branch'); } catch (err) /* istanbul ignore next */ { logger.info({ branchName, err }, 'Error deleting remote branch'); - throw new Error('repository-changed'); + if (err.message.includes('.github/main.workflow')) { + logger.warn( + 'A GitHub bug prevents gitFs + GitHub Actions. Please disable gitFs' + ); + } else { + throw new Error('repository-changed'); + } } try { await deleteLocalBranch(branchName); @@ -297,7 +303,11 @@ class Storage { ]); } catch (err) /* istanbul ignore next */ { logger.debug({ err }, 'Error commiting files'); - if (err.message.includes('[remote rejected]')) { + if (err.message.includes('.github/main.workflow')) { + logger.warn( + 'A GitHub bug prevents gitFs + GitHub Actions. Please disable gitFs' + ); + } else if (err.message.includes('[remote rejected]')) { throw new Error('repository-changed'); } throw err; -- GitLab