Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-07-31 09:37:54 +0300
committerStan Hu <stanhu@gmail.com>2018-07-31 09:37:54 +0300
commit3cda8c93d879282af2ab5b21ca2d89daf0238f17 (patch)
tree494ce2da69553ab6dfc41257bcc9feae3726fb42 /lib/bitbucket_server
parent7c88c4af0e31081b4137bc1b93e40d22ef6a93c6 (diff)
Fix merge request SHA
Diffstat (limited to 'lib/bitbucket_server')
-rw-r--r--lib/bitbucket_server/representation/activity.rb14
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