Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
export default function getInfo(TOKEN, myArrayOfRepositories) {
// let gh = new GitHub(); // unauthenticated client. Can even be used to create a anonymous gist for example
// basic auth. The same as unauthenticated, this approach is limited to GET/POST requests per day.
let gh = new GitHub({
username: 'your-user',
password: 'TBD',
// But with TOKEN provided no limits.
let gh = new GitHub({
token: TOKEN
myArrayOfRepositories.forEach(function(repository) {
let ghUserRepo = gh.getRepo(repository.owner,;
ghUserRepo.getDetails(function(err, data) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment