circle-cli
Advanced tools
Comparing version 1.1.0 to 1.1.1
33
index.js
@@ -70,2 +70,15 @@ #!/usr/bin/env node | ||
.command('ls', 'recent builds', function(yargs) { | ||
var argv = yargs.reset() | ||
.option("b", { | ||
alias: "branch", | ||
description: "branch" | ||
}) | ||
.option("r", { | ||
alias: "reponame", | ||
description: "reponame" | ||
}) | ||
.alias("h", "help") | ||
.help("h") | ||
.argv; | ||
fetch(API + 'recent-builds?circle-token=' + TOKEN) | ||
@@ -75,5 +88,13 @@ .then(function(response) { return response.json() }) | ||
var t = new Table | ||
data.filter(function(item) { | ||
return (item.branch === 'dev' || item.branch === 'master') | ||
}).forEach(function(item) { | ||
if (argv.r) { | ||
data = data.filter(function(item) { | ||
return argv.r.indexOf(item.reponame) !== -1 | ||
}) | ||
} | ||
if (argv.b) { | ||
data = data.filter(function(item) { | ||
return argv.b.indexOf(item.branch) !== -1 | ||
}) | ||
} | ||
data.forEach(function(item) { | ||
t.cell('#', notests(item.build_num)) | ||
@@ -250,3 +271,3 @@ t.cell('Repo', item.reponame) | ||
.command('artifacts', 'show recent build artifacts', function(yargs) { | ||
fetch(API + 'recent-builds' + TOKEN) | ||
fetch(API + 'recent-builds?circle-token=' + TOKEN) | ||
.then(function(response) { return response.json() }) | ||
@@ -271,3 +292,3 @@ .then(function(data) { | ||
.command('retry', 'retry recent build', function(yargs) { | ||
fetch(API + 'recent-builds' + TOKEN) | ||
fetch(API + 'recent-builds?circle-token=' + TOKEN) | ||
.then(function(response) { return response.json() }) | ||
@@ -290,3 +311,3 @@ .then(function(data) { | ||
.command('cancel', 'cancel recent build', function(yargs) { | ||
fetch(API + 'recent-builds' + TOKEN) | ||
fetch(API + 'recent-builds?circle-token=' + TOKEN) | ||
.then(function(response) { return response.json() }) | ||
@@ -293,0 +314,0 @@ .then(function(data) { |
{ | ||
"name": "circle-cli", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "circle-ci cli", | ||
@@ -5,0 +5,0 @@ "main": "index.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
107296
311