Get commits of GitHub repo since the last version tag with GitHub API.
Equivalent to this in a local git repo:
git log <yourlasttag>..HEAD
When there are many small (possibly inter-dependent) repos, we may forgot to tag and publish the repos after commits and PR.
This library list the commits since the last tagging. We can then evaluate the commits and determine whether we should create a new release for the repo.
- each tagging is followed by an
- tagging follows SemVer, versions with meta are considered unofficial and ignored
- forks are not to be tracked
npm i github-commits-since-tag
GitHub imposes a per IP rate limit on the calling of GitHub API, you need a Personal access tokens to enjoy higher rates. A token with no specific role should suffice.
// instance creationconst GHcst = ;const ghcst =user: 'GitHub username'token: 'GitHub token';// list specific repo (accessibility depends on token)// rejected upon invalid repo, forked repo, repo without tagghcst;// list all repo (accessibility depends on token)// ignore forked repo, repo without tagghcst;
Supported DEBUG tags: ghcst:flow, ghcst:data.
See visionmedia/debug for details.