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