git-commit-monitor

0.0.1 • Public • Published

monitor assign files change when git push

  • you should use it with husky git
  • you can get the diff with last commit brefore commit

ueage

npm install gitMonitor -D

config in package.json

assign the files and use cli in husky

  ...
  "repository": {
    "type": "https",
    "url": "https://xxxxxxxx",
    "monitorFiles": [
      "./package.json",
      ...
    ]
  },
    "husky": {
    "hooks": {
      ...
      "pre-commit": "gitMonitor './trigger.js'",
      ...
    }
  },
  ...

trigger function

  • If you monitor files exposed JSON or object, you can get objectDiff in diffRes
  • If you monitor files are not JSON or object, you can get stringDiff in diffRes
  • you can send diff result to chat group in trigger
module.exports = function (diffRes) {
  console.info(diffRes) // objectDiff 、stringDiff、branch、committer
  .....
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    0

Package Sidebar

Install

npm i git-commit-monitor

Weekly Downloads

0

Version

0.0.1

License

ISC

Unpacked Size

4.98 kB

Total Files

6

Last publish

Collaborators

  • zuolung