Find out a lot about a GitHub repository with a single request to GitHub's GraphQL API
Included so far:
package.json data from master branchAnd a wishlist of things to come.
Works in Node >=7. Not currently suitable for use in browsers.
npm install cool-story-repo
const coolStory = require('cool-story-repo')
coolStory('electron/electron').then(repo => {
console.log(repo)
})
coolStory can also optionally accept an array of repos.
const coolStory = require('cool-story-repo')
coolStory(['electron/electron', 'zeit/hyper']).then(repos => {
console.log(repos)
})
Unlike github's REST API, the github GraphQL API requires authentication for all requests. process.env.GH_TOKEN is required and should have "repo" scope.
Need a token? Get one here..
coolStory(repoName)repoName - A required string or array of strings in owner/repo format.Returns a Promise that resolves to a key-value repository Object or an array of repository Objects.
npm install
npm test
MIT