summaryrefslogtreecommitdiff
path: root/lib/bitbucket/representation/issue.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bitbucket/representation/issue.rb')
-rw-r--r--lib/bitbucket/representation/issue.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bitbucket/representation/issue.rb b/lib/bitbucket/representation/issue.rb
index 3af731753d1..054064395c3 100644
--- a/lib/bitbucket/representation/issue.rb
+++ b/lib/bitbucket/representation/issue.rb
@@ -12,11 +12,11 @@ module Bitbucket
end
def author
- raw.dig('reporter', 'username')
+ raw.fetch('reporter', {}).fetch('username', nil)
end
def description
- raw.dig('content', 'raw')
+ raw.fetch('content', {}).fetch('raw', nil)
end
def state
@@ -28,7 +28,7 @@ module Bitbucket
end
def milestone
- raw.dig('milestone', 'name')
+ raw['milestone']['name'] if raw['milestone'].present?
end
def created_at