Last active
August 29, 2015 14:24
Revisions
-
aroman revised this gist
Jul 3, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ let Promise = require('bluebird'); function showReposWithSomeFile() { gh.request('GET /user/repos') .map(repo => { -
aroman created this gist
Jul 3, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ function showReposWithSomeFile() { gh.request('GET /user/repos') .map(repo => { let someFileContents = gh.request('GET /repos/:owner/:repo/contents/:path', { owner: repo.owner.login, repo: repo.name, path: 'someFile', }); return { someFileContents, repo: { name: repo.name, owner: repo.owner.login } } }) .filter([someFileContents, repo] => { return appHubFileContents.state === 'fulfilled'; }) .each(repo => { // Do something with the repos that have 'someFile' in them. }) .catch(next); }