From dc7e6d34209aa2b4618976018b8bd98c239e87bd Mon Sep 17 00:00:00 2001 From: Fishrock123 Date: Mon, 19 May 2014 12:33:41 -0400 Subject: [PATCH] Allow standardize to target any github repo Closes #6 --- index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index bc6a463..a96638d 100644 --- a/index.js +++ b/index.js @@ -104,10 +104,15 @@ function* standardize(args, program) { var org = args[0] var config_repo = args[1] + // if the config_repo isn't a user/repo path, make it one. + if (!~config_repo.indexOf('/')) { + config_repo = org + '/' + config_repo + } + var repos = yield* get_repos(org) var res = yield request({ - url: 'https://api.github.com/repos/' + org + '/' + config_repo + '/contents/config/github_labels.json' + url: 'https://api.github.com/repos/' + config_repo + '/contents/config/github_labels.json' , headers: header , auth: auth , json: true