Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

srl295/core-validate-commit

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

core-validate-commit

Build Status Coverage Status

Validate the commit message for a particular commit in node core

Install

$ npm install [-g] core-validate-commit

Usage

# for a single commit
$ core-validate-commit <sha>

# validate since <sha>
$ git rev-list <sha>..HEAD | xargs core-validate-commit

# list all rules
$ core-validate-commit --list
    fixes-url enforce format of Fixes URLs
  line-length enforce max length of lines in commit body
 metadata-end enforce that metadata is at the end of commit messages
       pr-url enforce PR-URL
    reviewers enforce having reviewers
    subsystem enforce subsystem validity
 title-length enforce max length of commit title

Git hook installation

  • install node and core-validate-commits as above
  • install this hook in your clone of node (here ~/src/node):
ln -s commit-msg.sh   ~/src/node/.git/hooks/commit-msg
  • Alternatively, you may be able to pull from the npm-installed package:
ln  -s /usr/local/lib/node_modules/core-validate-commit/commit-msg.sh \
          ~/src/node/.git/hooks/commit-msg
  • make sure ~/src/node/.git/hooks/commit-msg is executable.

Test

$ npm test

Author

Evan Lucas

License

MIT (See LICENSE for more info)

About

Validate commit messages for Node.js core

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.