damus-github-export

Damus issue data exported from github
git clone git://jb55.com/damus-github-export
Log | Files | Refs | README | LICENSE

commit d6c61967db4090a2d3be19923c288a830fca7948
parent 7c0be68dbfb0ef19378b85536dcf12f89e0e45d5
Author: Gavin Rehkemper <gavin@gavinr.com>
Date:   Wed, 19 Jul 2017 12:27:15 -0500

converted all quotes to single-quotes

Diffstat:
Mindex.js | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/index.js b/index.js @@ -7,7 +7,7 @@ const prompt = require('co-prompt'); const GitHubApi = require('github'); const csv = require('csv'); const fs = require('fs'); -const Bottleneck = require("bottleneck"); +const Bottleneck = require('bottleneck'); program .version('0.2.0') @@ -17,12 +17,12 @@ program .action(function(file, options) { co(function*() { var retObject = {}; - retObject.githubUrl = options.github_enterprise || "github.com"; + retObject.githubUrl = options.github_enterprise || 'github.com'; if (retObject.githubUrl != 'github.com') { - retObject.pathPrefix = "/api/v3" + retObject.pathPrefix = '/api/v3' } - retObject.token = options.token || ""; - if (retObject.token == "") { + retObject.token = options.token || ''; + if (retObject.token == '') { retObject.token = yield prompt('token (get from https://' + retObject.githubUrl + '/settings/tokens): '); }; retObject.userOrOrganization = yield prompt('user or organization: '); @@ -49,7 +49,7 @@ program // OAuth2 github.authenticate({ - type: "oauth", + type: 'oauth', token: values.token }); @@ -108,10 +108,10 @@ program limiter.submit(github.issues.create,sendObj, function(err, res) { // Debugging console.log(JSON.stringify(res)); if (err) {console.error('ERROR', err)} else { - console.log("===> Created issue #" + res.number) + console.log('===> Created issue #' + res.number) // if we have a state column and state=closed, close the issue if (stateIndex > -1 && row[stateIndex] == 'closed') { - console.log("===> Closing issue #" + res.number); + console.log('===> Closing issue #' + res.number); var updateIssue = { user: values.userOrOrganization, repo: values.repo,