From a8caa9ce4922947ba057f259bccd017c2177e1b5 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 14 Sep 2020 18:09:48 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- lib/bitbucket_server/representation/pull_request.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/bitbucket_server/representation/pull_request.rb') 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 -- cgit v1.2.1