Sha256: 5416b7517b74561ea8888916815235177d3f3a85c9a57ee46530843cab6c34d6
Contents?: true
Size: 483 Bytes
Versions: 9
Compression:
Stored size: 483 Bytes
Contents
#!/usr/bin/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不符合规范!'.red exit 1 end def check(keyword) if @msg.start_with? keyword exit 0 end end commit_check
Version data entries
9 entries across 9 versions & 1 rubygems