From 0cef8ac3f2c912c35c12857f26240222c0f13b72 Mon Sep 17 00:00:00 2001 From: Othmane EL MASSARI <47815944+othmane399@users.noreply.github.com> Date: Sat, 19 Jun 2021 19:04:24 +0200 Subject: [PATCH] feat: add --gpg-sign option on commits (#518) Add --gpg-sign option on commits Signed-off-by: othmane399 --- lib/git/lib.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/git/lib.rb b/lib/git/lib.rb index ce8c141b..8dcb4f8a 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -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 @@ -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