diff options
author | Rémy Coutable <remy@rymai.me> | 2016-09-20 15:30:00 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-09-20 15:30:00 +0000 |
commit | f0bda348bbc382d4aef4261635e7416ab190ba56 (patch) | |
tree | e41c00198d7869d7e50adcf8a07ffaf878994817 /lib/gitlab | |
parent | 31ff272f763a93b944cd288cc35c54e5c2645ebd (diff) | |
parent | ace11553966cc7c313e666672de8c45418139429 (diff) | |
download | gitlab-ce-f0bda348bbc382d4aef4261635e7416ab190ba56.tar.gz |
Merge branch 'add_optional_author_for_commits' into 'master'
Add optional 'author' param when making commits
This fulfills https://gitlab.com/gitlab-org/gitlab-ce/issues/20789 by adding the ability to specify a user's ID to be used as the author of a commit.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/20789
See merge request !5822
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/git.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/git.rb b/lib/gitlab/git.rb index 7584efe4fa8..3ab99360206 100644 --- a/lib/gitlab/git.rb +++ b/lib/gitlab/git.rb @@ -18,6 +18,14 @@ module Gitlab end end + def committer_hash(email:, name:) + { + email: email, + name: name, + time: Time.now + } + end + def tag_name(ref) ref = ref.to_s if self.tag_ref?(ref) |