Skip to content

Commit

Permalink
Make code more concise
Browse files Browse the repository at this point in the history
  • Loading branch information
bittner committed Aug 11, 2020
1 parent d75e971 commit d441ca4
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/modulesync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,9 @@ def self.update(options)
end

def self.pr(module_options)
if !module_options.nil?
github_conf = module_options[:github]
gitlab_conf = module_options[:gitlab]
else
github_conf = nil
gitlab_conf = nil
end
module_options ||= {}
github_conf = module_options[:github]
gitlab_conf = module_options[:gitlab]

if !github_conf.nil?
base_url = github_conf[:base_url] || ENV.fetch('GITHUB_BASE_URL', 'https://api.github.com')
Expand Down

0 comments on commit d441ca4

Please sign in to comment.