2.1.1 • Published 4 years ago

git-repo-info v2.1.1

Weekly downloads
391,751
License
MIT
Repository
github
Last release
4 years ago

git-repo-info

Retrieves repo information without relying on the git command.

Usage

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
info.root                 // root directory for the Git repo or submodule
                          //   (if in a worktree, this is the directory containing the original copy)
info.commonGitDir         // directory containing Git metadata for this repo or submodule
                          //   (if in a worktree, this is the primary Git directory for the repo)
info.worktreeGitDir       // if in a worktree, the directory containing Git metadata specific to
                          //   this worktree; otherwise, this is the same as `commonGitDir`.

When called without any arguments, git-repo-info will automatically lookup upwards into parent directories to find the first match with a .git folder.

If passed an argument, it will be assumed to be the path to the repo's .git folder to inspect.

sp-service-details-retrieverboris-nodeshift@bilt/bilt-cligh-openapi-docs-devgh-openapi-docs-test@kobotech/core-actuatorregenie@infinitebrahmanuniverse/nolb-git-rnetlify-cligit-repo-blog-generator@everything-registry/sub-chunk-1761@aschmidt8/netlify-cli@aidc/chrome@alexistessier/node-module-starterkit-release-dep@dataparty/api@bassjs/cli@dangojs/unplugin-version-info@data-leakage-protection/signatures@decoupled/netlify-cli@bilt/last-build-infobrowserstack-node-sdkbrowserstack-cypress-clibvasilev-nodeshift@blunck/webpack-scriptscan-merge@brickblock/bbk-devtoolsqueue-run-builderqute-scaffoldprodperfectprodperfectqa-runnerreact-deployreact-deploy-revision-datarc-ts-scriptsruiramos-netlify-clisaashq-apiserver-healthscrimbascrimba-devserviciosset-commit-statusvite-plugin-infotestgrid-cypress-cliunplugin-build-infouniversal-clivuepress-plugin-remote-urlticketfly-shared-configtimularto-where-clisimple-nodeshiftsly-clisparo-libten-hands-clirecreationrbxts-transform-debugredok@cimpresscloud/ecs-publish@checkly/cli@ideasonpurpose/gulp-task-zipcustomized-netlify-clidata-loss-signatures@docfy/corecucumberjs-slack-botcz-format-extension@arcblock/arcli@erickponceleao/nodeshift@ga4gh/gh-openapi-docs@galenjiang/cz-format-extension@httptoolkit/netlify-cli@infosight/build-info-webpack-plugindev-build-releasedef-kit-light-isvdiff-run@dukaan/cli@dup4/starter-nestjs@eflexsystems/ember-data-model-fragments@eliperelman/netlify-cli@ember-data/private-build-infra@ember-data/-build-infracheck-commit@cloudticon/clichecklycreate-react-app-dist@jakenewby/ember-cli@microsoft/rush-lib@microsoft/spfx-heft-plugins@mablhq/mabl-cli@magic-circle/debug@magic-circle/editor@np-dev/jdi-vault@mashupmill/docker-scripts@nightwatch/browserstack@mango-scripts/utils@jobgetapp/ship-cli@omlet/clihyperbahnjenkins-cli-view@sgrove/netlify-cli@shedali/mdgenjdi-vaultlearnpack
2.1.1

4 years ago

2.1.0

5 years ago

2.0.0

6 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago