gitlab-cli
Advanced tools
Comparing version 0.0.16 to 0.0.17
@@ -175,7 +175,14 @@ #!/usr/bin/env node | ||
if (typeof data.length === 'number') { | ||
if (deps.options.json) console.log('['); | ||
data.forEach(function(item, i) { | ||
if (inFilters(item) && hasLabels(item)) { | ||
if (deps.options.json === false && stringify[deps.resource.type]) { | ||
data = data.filter(function(item) { | ||
return (inFilters(item) && hasLabels(item)); | ||
}); | ||
if (deps.options.json) { | ||
console.log(JSON.stringify(data, null, 2)); | ||
} | ||
else { | ||
data.forEach(function(item, i) { | ||
if (stringify[deps.resource.type]) { | ||
console.log(stringify[deps.resource.type](item)); | ||
@@ -186,6 +193,5 @@ } | ||
} | ||
if (!deps.options.json) console.log("-------------------------------------"); | ||
} | ||
}); | ||
if (deps.options.json) console.log(']'); | ||
console.log("-------------------------------------"); | ||
}); | ||
} | ||
} | ||
@@ -192,0 +198,0 @@ else if (inFilters(data) && hasLabels(data)) { |
@@ -102,2 +102,7 @@ var projects = []; | ||
{ | ||
// do not log on json output | ||
if (options.json) { | ||
return; | ||
} | ||
if (resource.project) { | ||
@@ -104,0 +109,0 @@ console.log(getActionVerb(action) + ' ' + resource.type + ' in project "' + resource.project + '" ...'); |
{ | ||
"name": "gitlab-cli", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "Gitlab API on the command line", | ||
@@ -5,0 +5,0 @@ "main": "./bin/cli.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23284
779