Use default branch when displaying list of badges
This commit is contained in:
parent
68ac8d38e2
commit
7689e87854
|
@ -4,7 +4,7 @@ class Projects::BadgesController < Projects::ApplicationController
|
|||
before_action :no_cache_headers, except: [:index]
|
||||
|
||||
def index
|
||||
@ref = params[:ref] || 'master'
|
||||
@ref = params[:ref] || @project.default_branch || 'master'
|
||||
@build_badge = Gitlab::Badge::Build.new(@project, @ref)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue