Skip to content
Snippets Groups Projects
Commit f510a199 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

refactor(gitlab): extra strength cleanup

parent 0e0d0508
No related branches found
No related tags found
No related merge requests found
...@@ -60,6 +60,7 @@ for (const x of helpers) { ...@@ -60,6 +60,7 @@ for (const x of helpers) {
} }
get.reset = function reset() { get.reset = function reset() {
cache = null;
cache = {}; cache = {};
}; };
......
...@@ -12,7 +12,7 @@ let config = {}; ...@@ -12,7 +12,7 @@ let config = {};
module.exports = { module.exports = {
getRepos, getRepos,
cleanRepo: () => undefined, cleanRepo,
initRepo, initRepo,
getRepoForceRebase, getRepoForceRebase,
setBaseBranch, setBaseBranch,
...@@ -79,6 +79,12 @@ function urlEscape(str) { ...@@ -79,6 +79,12 @@ function urlEscape(str) {
return str ? str.replace(/\//g, '%2F') : 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 // Initialize GitLab by getting base branch
async function initRepo({ repository, token, endpoint, gitAuthor }) { async function initRepo({ repository, token, endpoint, gitAuthor }) {
const opts = endpoints.find({ platform: 'gitlab' }, { token, endpoint }); const opts = endpoints.find({ platform: 'gitlab' }, { token, endpoint });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment