repo-info
v1.0.0
Published
Function that takes a path to a local repository and returns an information object.
Downloads
2
Readme
repo-info
A function that returns some basic information about a local repo.
var repoInfo = require('repo-info');
var info = repoInfo('/some/local/repo');
Synchronously returns an object like this:
{
currentBranch: 'master',
isClean: true,
githubOwner: 'sindresorhus',
githubName: 'cat-names'
}
Properties:
isClean
– whether the working directory is clean (i.e. no changes and no untracked files).currentBranch
– the name of the current branch.githubOwner
– the GitHub user/org who owns the repo (ornull
if it's not a GitHub repo)githubName
– the name of the repo on GitHub (ornull
if it's not a GitHub repo)
Licence
MIT