
Product
Introducing GitHub Actions Scanning Support
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.
git-cmd-repo-info
Advanced tools
Retrieves repo information WITH relying on the git command.
There is already a library that works without git command, but it's tied to git's internal implementation; the code is fussy and hard to understand. I'm reimplementing its functions using basic git command, which results in MUCH less and cleaner code.
Isn't a library relies on another program's output can be easy broken?
No. There are LOTS of third party git tools that relies on the native git command. They have been working without problems for years.
$ git show --format='%H%n%h%n%cn%n%cI%n%an%n%aI%n%s' -q --encoding=UTF-8
For getting basic info of the last commit. Formating switches used are documented by the offical git docs
$ git symbolic-ref --short HEAD
For getting working branch
$ git describe --tags --long --always
For getting tag info
var getRepoInfo = require('git-repo-info');
var info = getRepoInfo();
info.branch // current branch
info.sha // current sha
info.abbreviatedSha // first 10 chars of the current sha
info.tag // tag for the current sha (or `null` if no tag exists)
info.lastTag // tag for the closest tagged ancestor
// (or `null` if no ancestor is tagged)
info.commitsSinceLastTag // number of commits since the closest tagged ancestor
// (`0` if this commit is tagged, or `Infinity` if no ancestor is tagged)
info.committer // committer for the current sha
info.committerDate // commit date for the current sha
info.author // author for the current sha
info.authorDate // authored date for the current sha
info.commitMessage // commit message for the current sha
MIT
FAQs
Retrieves repo information WITH relying on the git command.
We found that git-cmd-repo-info demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.

Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.

Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.