Gathering detailed insights and metrics for gitinfo
Gathering detailed insights and metrics for gitinfo
Gathering detailed insights and metrics for gitinfo
Gathering detailed insights and metrics for gitinfo
npm install gitinfo
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
47 Stars
177 Commits
5 Forks
4 Watching
1 Branches
5 Contributors
Updated on 04 Oct 2022
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
26.8%
374
Compared to previous day
Last week
-28.7%
3,534
Compared to previous week
Last month
518.8%
13,365
Compared to previous month
Last year
-0.8%
37,282
Compared to previous year
Gets information about Git repository.
gitinfo reads the contents of the ./git
directory to extract information.
1import createGitinfo from 'gitinfo'; 2 3/** 4 * @typedef Configuration 5 * @property {string} [defaultBranchName] Default branch name to fallback to. Default: throws an error if branch cannot be resolved. 6 * @property {string} [gitPath] Path used to resolve .git path. Defaults to `__dirname`. 7 */ 8 9/** 10 * @access public 11 * @name createGitinfo 12 * @param {Configuration} userConfig 13 */ 14const gitinfo = createGitinfo(); 15 16/** 17 * Returns **Any** GitHub repository URL. 18 */ 19gitinfo.getGithubUrl(); 20 21/** 22 * Returns **Any** Name of the current branch. 23 */ 24gitinfo.getBranchName(); 25 26/** 27 * Returns **Any** Remote URL of the current branch. 28 */ 29gitinfo.getRemoteUrl(); 30 31/** 32 * Returns **Any** Absolute path to the .git/ directory. 33 */ 34gitinfo.getGitPath(); 35 36/** 37 * Returns **Any** Username of the repository author. 38 */ 39gitinfo.getUsername(); 40 41/** 42 * Returns **Any** Repository name. 43 */ 44gitinfo.getName(); 45 46/** 47 * Returns **Any** Commit SHA of the current branch. 48 */ 49gitinfo.getHeadSha(); 50 51/** 52 * Returns **Any** Representation of the .git/config file. 53 */ 54gitinfo.getConfig(); 55
Download using NPM:
1npm install gitinfo 2
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 5/24 approved changesets -- score normalized to 2
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
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
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