diff options
author | Stan Hu <stanhu@gmail.com> | 2018-07-30 23:37:54 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-07-30 23:37:54 -0700 |
commit | 3cda8c93d879282af2ab5b21ca2d89daf0238f17 (patch) | |
tree | 494ce2da69553ab6dfc41257bcc9feae3726fb42 /lib/bitbucket_server | |
parent | 7c88c4af0e31081b4137bc1b93e40d22ef6a93c6 (diff) | |
download | gitlab-ce-3cda8c93d879282af2ab5b21ca2d89daf0238f17.tar.gz |
Fix merge request SHA
Diffstat (limited to 'lib/bitbucket_server')
-rw-r--r-- | lib/bitbucket_server/representation/activity.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/bitbucket_server/representation/activity.rb b/lib/bitbucket_server/representation/activity.rb index a594b0881f6..08bf30a5d1e 100644 --- a/lib/bitbucket_server/representation/activity.rb +++ b/lib/bitbucket_server/representation/activity.rb @@ -28,25 +28,33 @@ module BitbucketServer end def committer_user - raw.dig('commit', 'committer', 'displayName') + commit.dig('committer', 'displayName') end def committer_email - raw.dig('commit', 'committer', 'emailAddress') + commit.dig('committer', 'emailAddress') end def merge_timestamp - timestamp = raw.dig('commit', 'committerTimestamp') + timestamp = commit['committerTimestamp'] self.class.convert_timestamp(timestamp) end + def merge_commit + commit['id'] + end + def created_at self.class.convert_timestamp(created_date) end private + def commit + raw.fetch('commit', {}) + end + def action raw['action'] end |