diff options
author | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-07-13 20:09:50 -0500 |
---|---|---|
committer | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-07-19 05:30:12 -0700 |
commit | 8bd7f6da6f50bd75a66e33ebe09536fd7f10bea6 (patch) | |
tree | 9b562ab27a017b962c6a9c063618b7ab49956e23 /app/controllers | |
parent | 4db94cb9d779b0a0a3d5681846a68e0fd2d66b21 (diff) | |
download | gitlab-ce-8bd7f6da6f50bd75a66e33ebe09536fd7f10bea6.tar.gz |
Remove builds settings from project settings; add builds settings route; add new controller action; put badge stuff under builds settings controller action
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/builds_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/projects/builds_controller.rb b/app/controllers/projects/builds_controller.rb index d7513d75f01..b03a37d8148 100644 --- a/app/controllers/projects/builds_controller.rb +++ b/app/controllers/projects/builds_controller.rb @@ -1,5 +1,5 @@ class Projects::BuildsController < Projects::ApplicationController - before_action :build, except: [:index, :cancel_all] + before_action :build, except: [:index, :cancel_all, :settings] before_action :authorize_read_build!, except: [:cancel, :cancel_all, :retry] before_action :authorize_update_build!, except: [:index, :show, :status, :raw] layout 'project' @@ -27,6 +27,11 @@ class Projects::BuildsController < Projects::ApplicationController redirect_to namespace_project_builds_path(project.namespace, project) end + def settings + @ref = params[:ref] || @project.default_branch || 'master' + @build_badge = Gitlab::Badge::Build.new(@project, @ref) + end + def show @builds = @project.pipelines.find_by_sha(@build.sha).builds.order('id DESC') @builds = @builds.where("id not in (?)", @build.id) |