diff options
author | Toon Claes <toon@gitlab.com> | 2019-02-28 19:57:34 +0100 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2019-02-28 19:57:34 +0100 |
commit | 62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch) | |
tree | c3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /lib/bitbucket/representation/issue.rb | |
parent | f6453eca992a9c142268e78ac782cef98110d183 (diff) | |
download | gitlab-ce-tc-standard-gem.tar.gz |
Ran standardrb --fix on the whole codebasetc-standard-gem
Inspired by https://twitter.com/searls/status/1101137953743613952 I
decided to try https://github.com/testdouble/standard on our codebase.
It's opinionated, but at least it's a _standard_.
Diffstat (limited to 'lib/bitbucket/representation/issue.rb')
-rw-r--r-- | lib/bitbucket/representation/issue.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/bitbucket/representation/issue.rb b/lib/bitbucket/representation/issue.rb index a88797cdab9..7c7a586f3bf 100644 --- a/lib/bitbucket/representation/issue.rb +++ b/lib/bitbucket/representation/issue.rb @@ -3,42 +3,42 @@ module Bitbucket module Representation class Issue < Representation::Base - CLOSED_STATUS = %w(resolved invalid duplicate wontfix closed).freeze + CLOSED_STATUS = %w[resolved invalid duplicate wontfix closed].freeze def iid - raw['id'] + raw["id"] end def kind - raw['kind'] + raw["kind"] end def author - raw.dig('reporter', 'username') + raw.dig("reporter", "username") end def description - raw.fetch('content', {}).fetch('raw', nil) + raw.fetch("content", {}).fetch("raw", nil) end def state - closed? ? 'closed' : 'opened' + closed? ? "closed" : "opened" end def title - raw['title'] + raw["title"] end def milestone - raw['milestone']['name'] if raw['milestone'].present? + raw["milestone"]["name"] if raw["milestone"].present? end def created_at - raw['created_on'] + raw["created_on"] end def updated_at - raw['edited_on'] + raw["edited_on"] end def to_s @@ -48,7 +48,7 @@ module Bitbucket private def closed? - CLOSED_STATUS.include?(raw['state']) + CLOSED_STATUS.include?(raw["state"]) end end end |