diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-12-11 15:34:11 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-12-11 20:02:09 +0300 |
commit | 73b04bebad23ce6750d7747c821a93cfeb73a9d2 (patch) | |
tree | ce65510e40c65623050cc9eca95ca534e4ead603 /app | |
parent | 2b7a75ceaf96830e482fc5c59460fe2dd6ff0a28 (diff) |
Fix errors
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 3 | ||||
-rw-r--r-- | app/models/commit_status.rb | 2 | ||||
-rw-r--r-- | app/services/create_commit_builds_service.rb | 1 | ||||
-rw-r--r-- | app/views/projects/commit/_builds.html.haml | 2 |
4 files changed, 2 insertions, 6 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 530f3d3dcb8..3ae4c5b099f 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -81,8 +81,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController end def builds - @ci_project = @merge_request.source_project.gitlab_ci_project - respond_to do |format| format.html { render 'show' } format.json { render json: { html: view_to_html_string('projects/merge_requests/show/_builds') } } @@ -106,7 +104,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController @first_commit = @merge_request.first_commit @diffs = @merge_request.compare_diffs - @ci_project = @source_project.gitlab_ci_project @ci_commit = @merge_request.ci_commit @statuses = @ci_commit.statuses if @ci_commit diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 77c3f776aab..21c5c87bc3d 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -77,7 +77,7 @@ class CommitStatus < ActiveRecord::Base end after_transition [:pending, :running] => :success do |build, transition| - MergeRequests::MergeWhenBuildSucceedsService.new(build.commit.gl_project, nil).trigger(build) + MergeRequests::MergeWhenBuildSucceedsService.new(build.commit.project, nil).trigger(build) end state :pending, value: 'pending' diff --git a/app/services/create_commit_builds_service.rb b/app/services/create_commit_builds_service.rb index 886bd88d204..392fe21eecf 100644 --- a/app/services/create_commit_builds_service.rb +++ b/app/services/create_commit_builds_service.rb @@ -26,4 +26,3 @@ class CreateCommitBuildsService commit end end - diff --git a/app/views/projects/commit/_builds.html.haml b/app/views/projects/commit/_builds.html.haml index c87b06d2f01..e65a5a9c2de 100644 --- a/app/views/projects/commit/_builds.html.haml +++ b/app/views/projects/commit/_builds.html.haml @@ -1,6 +1,6 @@ .gray-content-block.middle-block .pull-right - - if @ci_project && can?(current_user, :manage_builds, @ci_commit.project) + - if can?(current_user, :manage_builds, @ci_commit.project) - if @ci_commit.builds.latest.failed.any?(&:retryable?) = link_to "Retry failed", retry_builds_namespace_project_commit_path(@ci_commit.project.namespace, @ci_commit.project, @ci_commit.sha), class: 'btn btn-grouped btn-primary', method: :post |