summaryrefslogtreecommitdiff
path: root/lib/bitbucket_server/representation/pull_request.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-14 18:09:48 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-14 18:09:48 +0000
commita8caa9ce4922947ba057f259bccd017c2177e1b5 (patch)
treec2d3e86b3c0336630edc7604ea575ca605fd1dd0 /lib/bitbucket_server/representation/pull_request.rb
parenta483e9271bccdd2cb98cb4f3874fff5d3264d07d (diff)
downloadgitlab-ce-a8caa9ce4922947ba057f259bccd017c2177e1b5.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/bitbucket_server/representation/pull_request.rb')
-rw-r--r--lib/bitbucket_server/representation/pull_request.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/bitbucket_server/representation/pull_request.rb b/lib/bitbucket_server/representation/pull_request.rb
index c3e927d8de7..2f377bdced2 100644
--- a/lib/bitbucket_server/representation/pull_request.rb
+++ b/lib/bitbucket_server/representation/pull_request.rb
@@ -11,6 +11,12 @@ module BitbucketServer
raw.dig('author', 'user', 'emailAddress')
end
+ def author_username
+ raw.dig('author', 'user', 'username') ||
+ raw.dig('author', 'user', 'slug') ||
+ raw.dig('author', 'user', 'displayName')
+ end
+
def description
raw['description']
end