summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-05-30 12:34:25 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-05-30 12:34:25 +0200
commit86cf9dd2535adac3d739edbb845f7388e42f447d (patch)
tree4bb229abae9593b98d5020d08ace129678c3534d /lib
parent43c35b0f20fb3bb67ea2b96bf8f806c7e95b6aec (diff)
downloadgitlab-ce-86cf9dd2535adac3d739edbb845f7388e42f447d.tar.gz
Enable Lint/LiteralInCondition rubocop coprubocop/enable-literal-in-condition-cop
Checks of literals used in conditions. See #17478
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/github_import/pull_request_formatter.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/gitlab/github_import/pull_request_formatter.rb b/lib/gitlab/github_import/pull_request_formatter.rb
index 574737b31c1..a2947b56ad9 100644
--- a/lib/gitlab/github_import/pull_request_formatter.rb
+++ b/lib/gitlab/github_import/pull_request_formatter.rb
@@ -79,10 +79,9 @@ module Gitlab
end
def state
- @state ||= case true
- when raw_data.state == 'closed' && raw_data.merged_at.present?
+ @state ||= if raw_data.state == 'closed' && raw_data.merged_at.present?
'merged'
- when raw_data.state == 'closed'
+ elsif raw_data.state == 'closed'
'closed'
else
'opened'