How to use git-last-commit - 1 common examples

To help you get started, we’ve selected a few git-last-commit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dsgnhb / discord-bot / commands / system / changelog.js View on Github external
async run(message) {
    const settings = message.settings

    const packageJSON = await require('../../package.json')

    var git = require('git-last-commit')
    git.getLastCommit(function (err, commit) {
      return (
        new RichEmbed()
          .setAuthor(`Changelog v${packageJSON.version}`)
          .setDescription(commit.subject)
          .setURL(packageJSON.repository.url.split('+')[1].slice(0, -4))
          .setColor(settings.embedColor)
          .setTimestamp()
          .setFooter(settings.embedFooter, settings.embedIcon)
      )
    })
  }
}

git-last-commit

Read details of the last commit including tags

MIT
Latest version published 3 years ago

Package Health Score

50 / 100
Full package analysis

Popular git-last-commit functions