Get all branches from a GitHub repository
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.travis.yml
index.js
license
package.json
readme.md
test.js

readme.md

github-branches Build Status

Get all branches from a GitHub repository

Install

$ npm install --save github-branches

Usage

const githubBranches = require('github-branches');

githubBranches('kevva/github-branches').then(branches => {
	console.log(branches);
	/*
	[{
		name: 'master',
		commit: {
			sha: '768eda9204db19df0bd59cffd0386fac7686ce02',
			url: 'https://api.github.com/repos/kevva/github-branches/commits/768eda9204db19df0bd59cffd0386fac7686ce02'
		}
	}, ...]
	*/
});

Related

License

MIT © Kevin Mårtensson