From e5759e412636c1224a27ede1fa3f7f97b51eae58 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 28 May 2024 10:34:15 -0700 Subject: [PATCH] redmine-backporter.rb: Print help on wrong usage --- tool/redmine-backporter.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/redmine-backporter.rb b/tool/redmine-backporter.rb index 44b44920d4..da3b71a640 100755 --- a/tool/redmine-backporter.rb +++ b/tool/redmine-backporter.rb @@ -35,11 +35,11 @@ http_options[:verify_mode] = OpenSSL::SSL::VERIFY_NONE unless ssl_verify $openuri_options = {} $openuri_options[:ssl_verify_mode] = OpenSSL::SSL::VERIFY_NONE unless ssl_verify -TARGET_VERSION = target_version || ENV['TARGET_VERSION'] || (raise 'need to specify TARGET_VERSION') +TARGET_VERSION = target_version || ENV['TARGET_VERSION'] || (puts opts.help; raise 'need to specify TARGET_VERSION') RUBY_REPO_PATH = repo_path || ENV['RUBY_REPO_PATH'] BACKPORT_CF_KEY = 'cf_5' STATUS_CLOSE = 5 -REDMINE_API_KEY = api_key || ENV['REDMINE_API_KEY'] || (raise 'need to specify REDMINE_API_KEY') +REDMINE_API_KEY = api_key || ENV['REDMINE_API_KEY'] || (puts opts.help; raise 'need to specify REDMINE_API_KEY') REDMINE_BASE = 'https://bugs.ruby-lang.org' @query = {