Skip to content

Instantly share code, notes, and snippets.

@garlicnation
Created December 13, 2016 22:50
Show Gist options
  • Save garlicnation/82b2ecd5380af359923715c81dbe8b07 to your computer and use it in GitHub Desktop.
Save garlicnation/82b2ecd5380af359923715c81dbe8b07 to your computer and use it in GitHub Desktop.
Async await github api example
let tagResponse = await api.gitdata.getTags({owner: org, repo: component});
let allTags = tagResponse.slice();
while (api.hasNextPage(tagResponse)) {
tagResponse = await api.getNextPage(tagResponse);
allTags = allTags.concat(tagResponse);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment