Skip to content

Commit 0865cfb

Browse files
committed
add --gpg-sign option on commits
Signed-off-by: othmane399 <othmane.elmassari@doctolib.com>
1 parent e2fd4af commit 0865cfb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/git/lib.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,7 @@ def remove(path = '.', opts = {})
642642
# :date
643643
# :no_verify
644644
# :allow_empty_message
645+
# :sign
645646
#
646647
# @param [String] message the commit message to be used
647648
# @param [Hash] opts the commit options to be used
@@ -655,6 +656,7 @@ def commit(message, opts = {})
655656
arr_opts << "--date=#{opts[:date]}" if opts[:date].is_a? String
656657
arr_opts << '--no-verify' if opts[:no_verify]
657658
arr_opts << '--allow-empty-message' if opts[:allow_empty_message]
659+
arr_opts << "--gpg-sign=#{opts[:sign]}" if opts[:sign] || "--gpg-sign" if opts[:sign]=''
658660

659661
command('commit', arr_opts)
660662
end

0 commit comments

Comments
 (0)