Skip to content

Commit

Permalink
fixing some things i missed
Browse files Browse the repository at this point in the history
  • Loading branch information
machellerogden committed Feb 14, 2017
1 parent 14120df commit 181987e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 0 additions & 2 deletions lib/getSourceData.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ function getSourceData(forceRefresh = false) {
let mappedSourceData = _.zipObject(sourceKeys, sourceData);
mappedSourceData = _.mapValues(mappedSourceData, _.flow(_.flattenDeep, _.compact));
mappedSourceData = _.mapValues(mappedSourceData, (entries) => _.uniqBy(entries, 'name'));
console.log('mappedSourceData');
console.log(mappedSourceData);
return new Promise((resolve, reject) => {
fs.writeJSON(path.normalize(__dirname + '/../sources/.cache.json'), mappedSourceData, null, 4);
fs.commit((err) => {
Expand Down
12 changes: 9 additions & 3 deletions setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,18 @@ function setup() {
message: 'Please enter your private access token (generate one at https://github.com/settings/tokens/new):',
when: (answers) => answers.addGithubPrivateAccess
},
{
type: 'confirm',
name: 'addOtherGithubUsernames',
message: 'Would you like to track public repos from specific Github users?',
default: true,
when: (answers) => answers.addGithub
},
{
type: 'input',
name: 'githubUsernames',
message: 'Please type the github usernames OTHER THAN YOUR OWN which you want bitcar to track (comma separated, no spaces):',
default: '',
when: (answers) => answers.addGithub
message: 'Please type the github usernames which you want bitcar to track (comma separated, no spaces):',
when: (answers) => answers.addOtherGithubUsernames
},
{
type: 'confirm',
Expand Down
4 changes: 2 additions & 2 deletions sources/github.com/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ function githubSourcePromise(config) {
const githubConfig = _.find(config.sources, { type: 'github' });
let resultPromises = [];
if (githubConfig && githubConfig.accessToken) {
resultPromises.push(getOwnRepos(githubConfig).then((data) => { console.log('data:', data);return data; }));
resultPromises.push(getOwnRepos(githubConfig));
}
if (githubConfig && githubConfig.usernames) {
//resultPromises = resultPromises.concat(getReposFromUsernames(githubConfig));
resultPromises = resultPromises.concat(getReposFromUsernames(githubConfig));
} else {
return Promise.resolve([]);
}
Expand Down

0 comments on commit 181987e

Please sign in to comment.