diff --git a/lib/modulesync.rb b/lib/modulesync.rb index ec050557..d742a121 100644 --- a/lib/modulesync.rb +++ b/lib/modulesync.rb @@ -184,9 +184,14 @@ def self.update(options) exit 1 if errors && options[:fail_on_warnings] end - def self.pr(module_options = {}) - github_conf = module_options[:github] - gitlab_conf = module_options[:gitlab] + 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 if !github_conf.nil? base_url = github_conf[:base_url] || ENV.fetch('GITHUB_BASE_URL', 'https://api.github.com')