diff options
Diffstat (limited to 'lib/bitbucket_server/representation/activity.rb')
-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 |