
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
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.
The npm package git-cmd-repo-info receives a total of 33 weekly downloads. As such, git-cmd-repo-info popularity was classified as not popular.
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.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.