gitlab-cli
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -70,2 +70,15 @@ var projects = []; | ||
function getProjectsByNamespace(namespace, projects) | ||
{ | ||
var _projects = []; | ||
projects.forEach(function(project, i) { | ||
if (project.path_with_namespace.substr(0, namespace.length) === namespace) { | ||
_projects.push(project); | ||
} | ||
}); | ||
return _projects; | ||
} | ||
function getActionVerb(action) | ||
@@ -189,3 +202,11 @@ { | ||
if (checkResource(cb)) { | ||
client[resource.type].list(data, cb); | ||
client[resource.type].list(data, function(error, data) { | ||
if (data) { | ||
if (resource.type === 'projects' && resource.namespace) { | ||
data = getProjectsByNamespace(resource.namespace, data); | ||
} | ||
} | ||
cb(error, data); | ||
}); | ||
} | ||
@@ -192,0 +213,0 @@ } |
{ | ||
"name": "gitlab-cli", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "Gitlab API on the command line", | ||
@@ -5,0 +5,0 @@ "main": "./bin/cli.js", |
Sorry, the diff of this file is not supported yet
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
70704
754