[#345] owner_and_name -> name_with_owner
This commit is contained in:
parent
36d61d2e08
commit
fc4ad9ac0a
|
@ -22,7 +22,7 @@ module Rosa
|
||||||
def self.matches?(request)
|
def self.matches?(request)
|
||||||
if (params = request.path_parameters) && params[:treeish] # parse existing branch (tag) and path
|
if (params = request.path_parameters) && params[:treeish] # parse existing branch (tag) and path
|
||||||
branch_or_tag = begin
|
branch_or_tag = begin
|
||||||
(p = Project.find_by_owner_and_name params[:owner_and_name]) &&
|
(p = Project.find_by_owner_and_name params[:name_with_owner]) &&
|
||||||
p.repo.branches_and_tags.map(&:name).sort{|a,b| b.length <=> a.length}.detect{|b| params[:treeish].start_with?(b)} ||
|
p.repo.branches_and_tags.map(&:name).sort{|a,b| b.length <=> a.length}.detect{|b| params[:treeish].start_with?(b)} ||
|
||||||
params[:treeish].split('/').first
|
params[:treeish].split('/').first
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue