Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

git-commit-info

JPeer26443.1kMIT2.0.2TypeScript support: included

Get the info of an specific commit hash

is, git, repository, repo, is-git, needs, push

readme

git-commit-info

Get all information about a specific commit.

Build Status Build status Coverage Status

Installation

$ npm i git-commit-info --save

or

$ yarn add git-commit-info

Usage

Available parameters:

  • cwd: Specify the path. Default: process.cwd()
  • commit: The hash of the commit. Default: latest
const gitCommitInfo = require('git-commit-info');

// information of process.cwd() and the latest commit
gitCommitInfo();

// information of the latest commit in ./my_repo
gitCommitInfo({
  cwd: './my_repo',
});

// information of the specified commit in process.cwd()
gitCommitInfo({
  commit: '82442c2405804d7aa44e7bedbc0b93bb17707626', // any hash
});

// information of the specified commit in ./my_repo
gitCommitInfo({
  cwd: './my_repo',
  commit: '82442c2405804d7aa44e7bedbc0b93bb17707626', // any hash
});

LICENSE

MIT © Jan Peer Stöcklmair

changelog

2.0.2 - June, 08 2023

  • f7c491e Fix: validate commit hashes before executing them | closes #24 (JPeer264)

2.0.1 - January, 12 2022

  • f42cee3 Fix: should noop if info array has no values (closes #14) (JPeer264)

2.0.0 - July, 12 2020

  • 34f194b Docs: update travis badge (JPeer264)
  • a8bffba Docs: add coveralls to docs (JPeer264)
  • 4196aca Feat: remove ts errors | change path strategy (JPeer264)
  • 5d6e2f0 Feat: change to typescript (JPeer264)

1.1.0 - June, 29 2018

  • 78cdb3a Feat: provide error in returned object (#3) (Jan Peer Stöcklmair)
  • f876161 Chore: add test linting (#5) (Jan Peer Stöcklmair)
  • a879620 CI: support more node versions (#4) (Jan Peer Stöcklmair)

1.0.1 - June, 24 2018

  • 8868079 Fix: correct info on merge commits (closes #1) (#2) (Valeri Tsertsvadze)