diff options
| author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-12-16 19:51:40 -0200 |
|---|---|---|
| committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-12-16 19:51:40 -0200 |
| commit | a3be4aeb7a71cc940394a5f13d09e79fcafdb1d5 (patch) | |
| tree | 8c13713b04535427695355d9849820b20e5dc60d /lib/bitbucket/representation/issue.rb | |
| parent | fe9a372c0b64b47117fc0a64dbdfb514f757ee6e (diff) | |
| download | gitlab-ce-a3be4aeb7a71cc940394a5f13d09e79fcafdb1d5.tar.gz | |
Avoid use of Hash#dig to keep compatibility with Ruby 2.1
Diffstat (limited to 'lib/bitbucket/representation/issue.rb')
| -rw-r--r-- | lib/bitbucket/representation/issue.rb | 6 |
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 |
