As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Commit 38b8600f authored by Pablo Carranza's avatar Pablo Carranza
Browse files

Invert clause when checking key for clarity

parent 089df337
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -18,8 +18,8 @@ require_relative "../lib/gitlab_net"
require_relative "../lib/gitlab_keys"
authorized_key = GitlabNet.new.authorized_key(key)
unless authorized_key.nil?
puts GitlabKey.new.key_line("key-#{authorized_key['id']}", authorized_key["key"])
else
if authorized_key.nil?
puts "# No key was found for #{key}"
else
puts GitlabKey.new.key_line("key-#{authorized_key['id']}", authorized_key["key"])
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment