diff --git a/Gemfile.lock b/Gemfile.lock index 4f1cab43dd57759f48944ccf6a0bd3e03a8a9b1e..513e2c643e644e1fedd534b323ee19476322f56f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -188,7 +188,7 @@ GEM dotenv (>= 0.7) thor (>= 0.13.6) formatador (0.2.4) - gemnasium-gitlab-service (0.2.5) + gemnasium-gitlab-service (0.2.4) rugged (~> 0.21) gemojione (2.0.0) json diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb index 48458baa674f27971662134b2b24b4cc22eb3a2b..3cd812825e2546912a049ced0f7d82f97bdae038 100644 --- a/app/mailers/emails/projects.rb +++ b/app/mailers/emails/projects.rb @@ -16,13 +16,17 @@ module Emails subject: subject("Project was moved")) end - def repository_push_email(project_id, recipient, author_id:, - ref:, - action:, + def repository_push_email(project_id, recipient, author_id: nil, + ref: nil, + action: nil, compare: nil, reverse_compare: false, send_from_committer_email: false, disable_diffs: false) + unless author_id && ref && action + raise ArgumentError, "missing keywords: author_id, ref, action" + end + @project = Project.find(project_id) @author = User.find(author_id) @reverse_compare = reverse_compare