Skip to content

Instantly share code, notes, and snippets.

@sempostma
Created July 22, 2019 10:39
Show Gist options
  • Save sempostma/ccb371b7ebcb73e793cdf045ac422083 to your computer and use it in GitHub Desktop.
Save sempostma/ccb371b7ebcb73e793cdf045ac422083 to your computer and use it in GitHub Desktop.
Get all repo commits json
fetch('https://api.github.com/repos/:user/:repo/commits')
.then(x => x.json())
.then(json => json.map(x => ({ author: x.commit.author.name, date: x.commit.author.date })))
.then(console.log)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment