Gathering detailed insights and metrics for git-cmd-repo-info
Gathering detailed insights and metrics for git-cmd-repo-info
Gathering detailed insights and metrics for git-cmd-repo-info
Gathering detailed insights and metrics for git-cmd-repo-info
Retrieves repo information WITH relying on the git command.
npm install git-cmd-repo-info
Typescript
Module System
Node Version
NPM Version
69.1
Supply Chain
83.4
Quality
75.5
Maintenance
100
Vulnerability
100
License
JavaScript (70.5%)
TypeScript (29.5%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
15 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Jun 28, 2022
Latest Version
1.0.7
Package Id
git-cmd-repo-info@1.0.7
Unpacked Size
11.58 kB
Size
3.84 kB
File Count
11
NPM Version
8.13.1
Node Version
18.4.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
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.
1$ 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
1$ git symbolic-ref --short HEAD
For getting working branch
1$ git describe --tags --long --always
For getting tag info
1var getRepoInfo = require('git-repo-info'); 2 3var info = getRepoInfo(); 4 5info.branch // current branch 6info.sha // current sha 7info.abbreviatedSha // first 10 chars of the current sha 8info.tag // tag for the current sha (or `null` if no tag exists) 9info.lastTag // tag for the closest tagged ancestor 10 // (or `null` if no ancestor is tagged) 11info.commitsSinceLastTag // number of commits since the closest tagged ancestor 12 // (`0` if this commit is tagged, or `Infinity` if no ancestor is tagged) 13info.committer // committer for the current sha 14info.committerDate // commit date for the current sha 15info.author // author for the current sha 16info.authorDate // authored date for the current sha 17info.commitMessage // commit message for the current sha
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 0/15 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More