gitlab-cli
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -193,16 +193,2 @@ var projects = []; | ||
function remove(cb) | ||
{ | ||
log('remove'); | ||
resolveProjectId(); | ||
if (checkResourceId(cb) && checkResource(cb)) { | ||
client[resource.type].remove(data, cb); | ||
} | ||
} | ||
module.exports.remove = remove; | ||
function create(cb) | ||
@@ -215,2 +201,6 @@ { | ||
if (checkResource(cb)) { | ||
// projects have 'names' not 'titles' | ||
if (resource.type === 'projects' && data.title && !data.name) { | ||
data.name = data.title; | ||
} | ||
client[resource.type].create(data, cb); | ||
@@ -235,2 +225,15 @@ } | ||
function remove(cb) | ||
{ | ||
log('remove'); | ||
resolveProjectId(); | ||
if (checkResourceId(cb) && checkResource(cb)) { | ||
client[resource.type].remove(data, cb); | ||
} | ||
} | ||
module.exports.remove = remove; | ||
function open(cb) | ||
@@ -249,3 +252,3 @@ { | ||
if (resource.type === 'issues') { | ||
if (checkResourceId(cb)) { | ||
if (checkResourceId(function(){})) { | ||
data.state_event = 'reopen'; | ||
@@ -252,0 +255,0 @@ |
@@ -34,9 +34,12 @@ var defaults = require('../defaults'); | ||
resource.type = (_resource.length >= 3) ? | ||
(_resource[2].substr(-1,1) == 's') ? _resource[2] : _resource[2] + 's' | ||
: (_resource.length === 1) ? _resource[0] : _resource[1] | ||
_resource[2] : (_resource.length === 1) ? _resource[0] : _resource[1] | ||
; | ||
resource.id = _resource[3] || null; | ||
if (resource.type.substr(-1,1) !== 's') { | ||
resource.type += 's'; | ||
} | ||
return resource; | ||
} | ||
module.exports = parse; |
{ | ||
"name": "gitlab-cli", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"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
68250
711