Skip to content

Commit dc7e6d3

Browse files
committed
Allow standardize to target any github repo
Closes #6
1 parent 311159b commit dc7e6d3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,15 @@ function* standardize(args, program) {
104104
var org = args[0]
105105
var config_repo = args[1]
106106

107+
// if the config_repo isn't a user/repo path, make it one.
108+
if (!~config_repo.indexOf('/')) {
109+
config_repo = org + '/' + config_repo
110+
}
111+
107112
var repos = yield* get_repos(org)
108113

109114
var res = yield request({
110-
url: 'https://api.github.com/repos/' + org + '/' + config_repo + '/contents/config/github_labels.json'
115+
url: 'https://api.github.com/repos/' + config_repo + '/contents/config/github_labels.json'
111116
, headers: header
112117
, auth: auth
113118
, json: true

0 commit comments

Comments
 (0)