summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-05-30 17:56:15 +0000
committerRobert Speicher <robert@gitlab.com>2016-05-30 17:56:15 +0000
commitea329376302bac3bd49244ad043fa8adeb1d002e (patch)
treec3cf2d95c548135076bcc87616b82f8f2fe095ac /lib
parent7a6d069f419d796acafe8caa203385f510ca94ca (diff)
parent86cf9dd2535adac3d739edbb845f7388e42f447d (diff)
downloadgitlab-ce-ea329376302bac3bd49244ad043fa8adeb1d002e.tar.gz
Merge branch 'rubocop/enable-literal-in-condition-cop' into 'master'
Enable Lint/LiteralInCondition rubocop cop Detects literals used in conditions. See #17478 See merge request !4354
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'