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

refactor: github datasource clean

parent c21029ec
Branches
Tags
No related merge requests found
...@@ -9,7 +9,6 @@ module.exports = { ...@@ -9,7 +9,6 @@ module.exports = {
async function getDependency(repo, options = {}) { async function getDependency(repo, options = {}) {
const ref = options.ref || 'tag'; const ref = options.ref || 'tag';
const clean = options.clean === 'true';
let versions; let versions;
let endpoint; let endpoint;
let token; let token;
...@@ -51,7 +50,7 @@ async function getDependency(repo, options = {}) { ...@@ -51,7 +50,7 @@ async function getDependency(repo, options = {}) {
return null; return null;
} }
versions = versions.filter(version => isVersion(version)); versions = versions.filter(version => isVersion(version));
if (clean) { if (options.clean === 'true') {
versions = versions.map(version => version.replace(/^v/, '')); versions = versions.map(version => version.replace(/^v/, ''));
} }
const dependency = { const dependency = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment