module Fuel::CLI::GerritCommon
Public Instance Methods
changes_endpoint(change_id = nil, path = nil)
click to toggle source
# File lib/fuel/cli/gerrit_common.rb, line 18 def changes_endpoint(change_id = nil, path = nil) url = "#{gerrit_url}/a/changes/" url += "#{change_id}/" if change_id url += path if path url end
fetch_change_id_or_fail()
click to toggle source
# File lib/fuel/cli/gerrit_common.rb, line 4 def fetch_change_id_or_fail change_id = commit_message =~ /Change-Id: (.*)/ && $1 change_id or raise Thor::Error, set_color("No appropriate commit found at HEAD", :red) end
gerrit_ref(result)
click to toggle source
# File lib/fuel/cli/gerrit_common.rb, line 13 def gerrit_ref(result) current_rev = result['current_revision'] result['revisions'][current_rev]['fetch']['ssh']['ref'] end
gerrit_url()
click to toggle source
# File lib/fuel/cli/gerrit_common.rb, line 9 def gerrit_url Fuel::Util::Config.get('gerrit', 'url').chomp('/') end