Class: T1k::Commands::Commit
- Inherits:
-
Object
- Object
- T1k::Commands::Commit
- Defined in:
- lib/t1k/commands/commit.rb
Class Method Summary collapse
Class Method Details
.run(message, close, add, no_message) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/t1k/commands/commit.rb', line 5 def self.run(, close, add, ) ||= "" text_close = '' raise "Message can't be blank. Use --no-message to ignore this rule." if .empty? && ! branch = T1k::Commands::Branch.actual_branch.gsub("CARD","") text_close = close ? 'close' : 'ref' text_add = add ? 'a' : '' system "git commit -#{text_add}m '[#{text_close}##{branch.strip}] #{}'" end |