GithubHelp home page GithubHelp logo

antife-yinyue / last-commit-log Goto Github PK

View Code? Open in Web Editor NEW

This project forked from node-modules/last-commit-log

0.0 0.0 0.0 53 KB

Node.js module to get the last git commit information - mostly to be used by CI/CD and building phase.

License: MIT License

JavaScript 100.00%

last-commit-log's Introduction

last-commit-log


NPM version build status Test coverage node version npm download

Node.js module to get the last git commit information - mostly to be used by CI/CD and building phase.

Who are using

For more

Usage

const LCL = require('last-commit-log');
const lcl = new LCL(); // or `new LCL(dir)` dir is process.cwd() by default

lcl
  .getLastCommit()
  .then(commit => console.log(commit));

full examples

commit information is an object like this:

{
  "gitTag": "2.0.0",
  "gitBranch": "master",
  "gitRemote": "[email protected]:group/repo.git", // .git http or ssh
  "gitUrl": "http://github.com/group/repo",     // url only
  "shortHash": "42dc921",
  "hash": "42dc921d25a3e7e1607302d2acfdc3fd991c0c01",
  "subject": "chore: add lock",
  "sanitizedSubject": "chore-add-lock",
  "body": "",
  "committer": {
    "date": "1515240839",
    "relativeDate": "2 hours ago",
    "name": "Committer Fred",
    "email": "[email protected]"
  },
  "author": {
    "date": "1515240839",
    "relativeDate": "2 hours ago",
    "name": "Author Baz",
    "email": "[email protected]"
  }
}

inspired by git-last-commit and fixed the parsing issue.

Contributors


zhangyuheng


xudafeng

This project follows the git-contributor spec, auto upated at Tue Aug 14 2018 13:43:42 GMT+0800.

License

The MIT License (MIT)

last-commit-log's People

Contributors

antife-yinyue avatar xudafeng avatar zhangyuheng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.