Skip to content

Commit

Permalink
feat: add --gpg-sign option on commits (#518)
Browse files Browse the repository at this point in the history
Add --gpg-sign option on commits

Signed-off-by: othmane399 <othmane.elmassari@doctolib.com>
  • Loading branch information
othmane399 committed Jun 19, 2021
1 parent 765df7c commit 0cef8ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/git/lib.rb
Expand Up @@ -646,6 +646,7 @@ def remove(path = '.', opts = {})
# :date
# :no_verify
# :allow_empty_message
# :gpg_sign
#
# @param [String] message the commit message to be used
# @param [Hash] opts the commit options to be used
Expand All @@ -659,6 +660,7 @@ def commit(message, opts = {})
arr_opts << "--date=#{opts[:date]}" if opts[:date].is_a? String
arr_opts << '--no-verify' if opts[:no_verify]
arr_opts << '--allow-empty-message' if opts[:allow_empty_message]
arr_opts << '--gpg-sign' if opts[:gpg_sign] == true || "--gpg-sign=#{opts[:gpg_sign]}" if opts[:gpg_sign]

command('commit', arr_opts)
end
Expand Down

0 comments on commit 0cef8ac

Please sign in to comment.