Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/ci/detailed_status_type.rb')
-rw-r--r--app/graphql/types/ci/detailed_status_type.rb20
1 files changed, 9 insertions, 11 deletions
diff --git a/app/graphql/types/ci/detailed_status_type.rb b/app/graphql/types/ci/detailed_status_type.rb
index 8bc50e974bb..e18770c2708 100644
--- a/app/graphql/types/ci/detailed_status_type.rb
+++ b/app/graphql/types/ci/detailed_status_type.rb
@@ -39,17 +39,15 @@ module Types
end
def action
- if object.has_action?
- {
- button_title: object.action_button_title,
- icon: object.action_icon,
- method: object.action_method,
- path: object.action_path,
- title: object.action_title
- }
- else
- nil
- end
+ return unless object.has_action?
+
+ {
+ button_title: object.action_button_title,
+ icon: object.action_icon,
+ method: object.action_method,
+ path: object.action_path,
+ title: object.action_title
+ }
end
end
# rubocop: enable Graphql/AuthorizeTypes