diff --git a/lib/platform/gitlab/gl-got-wrapper.js b/lib/platform/gitlab/gl-got-wrapper.js index b5d8e04b89ffed2534cfebb1853d67c0e5c7fa30..370545fa38fb0a22dd854800c62fb64455adc3ca 100644 --- a/lib/platform/gitlab/gl-got-wrapper.js +++ b/lib/platform/gitlab/gl-got-wrapper.js @@ -60,6 +60,7 @@ for (const x of helpers) { } get.reset = function reset() { + cache = null; cache = {}; }; diff --git a/lib/platform/gitlab/index.js b/lib/platform/gitlab/index.js index db8dfa6a6a00267059096cd25723b38d26c12785..8af5dd8396c4a8c446e9dbc40b530def090f813c 100644 --- a/lib/platform/gitlab/index.js +++ b/lib/platform/gitlab/index.js @@ -12,7 +12,7 @@ let config = {}; module.exports = { getRepos, - cleanRepo: () => undefined, + cleanRepo, initRepo, getRepoForceRebase, setBaseBranch, @@ -79,6 +79,12 @@ function urlEscape(str) { return str ? str.replace(/\//g, '%2F') : str; } +function cleanRepo() { + // In theory most of this isn't necessary. In practice.. + get.reset(); + config = {}; +} + // Initialize GitLab by getting base branch async function initRepo({ repository, token, endpoint, gitAuthor }) { const opts = endpoints.find({ platform: 'gitlab' }, { token, endpoint });