Sha256: 5e8f3e370f1a187267e03a91310a60a2c167412828090b1771c817eb3674245f
Contents?: true
Size: 566 Bytes
Versions: 5
Compression:
Stored size: 566 Bytes
Contents
#!/usr/bin/env ruby require 'colorize' @msg = IO.read(ARGV[0]).force_encoding('UTF-8') def commit_check standards = %w(fix: fix: feat: feat: style: style: doc: doc: docs: docs: ref: ref: refactor: refactor: chore: chore: test: test: Merge merge Revert revert) standards.each do |standard| check(standard) end puts '====> commit message不符合规范,请查看规范 https://naxg5qz90v.feishu.cn/wiki/wikcnGAC0ayqRw5SSyj6QFQESKb'.red exit 1 end def check(keyword) if @msg.start_with? keyword exit 0 end end commit_check
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
dngg-0.1.0 | lib/dngg/hook/commit-msg |
dngg-0.0.9 | lib/dngg/hook/commit-msg |
dngg-0.0.8 | lib/dngg/hook/commit-msg |
dngg-0.0.7 | lib/dngg/hook/commit-msg |
dngg-0.0.6 | lib/dngg/hook/commit-msg |