Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2016-11-25 21:10:32 +0300
committerFilipa Lacerda <filipa@gitlab.com>2016-12-21 14:18:13 +0300
commit9a82aa70e3f3ff679c7a27ccbb9d497576b20822 (patch)
treece3319cfb4aae72797bc0f3f247d79a41481e551 /app/controllers/projects/commit_controller.rb
parentdfa842ce1de5b93bca2f336f3cf8c8769a555853 (diff)
Remove builds tab from commit
Remove unused file Fix commit link
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r--app/controllers/projects/commit_controller.rb31
1 files changed, 2 insertions, 29 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb
index 8197d9e4c99..3a5bf7d9ff5 100644
--- a/app/controllers/projects/commit_controller.rb
+++ b/app/controllers/projects/commit_controller.rb
@@ -8,13 +8,10 @@ class Projects::CommitController < Projects::ApplicationController
# Authorize
before_action :require_non_empty_project
- before_action :authorize_download_code!, except: [:cancel_builds, :retry_builds]
- before_action :authorize_update_build!, only: [:cancel_builds, :retry_builds]
before_action :authorize_read_pipeline!, only: [:pipelines]
- before_action :authorize_read_commit_status!, only: [:builds]
before_action :commit
- before_action :define_commit_vars, only: [:show, :diff_for_path, :builds, :pipelines]
- before_action :define_status_vars, only: [:show, :builds, :pipelines]
+ before_action :define_commit_vars, only: [:show, :diff_for_path, :pipelines]
+ before_action :define_status_vars, only: [:show, :pipelines]
before_action :define_note_vars, only: [:show, :diff_for_path]
before_action :authorize_edit_tree!, only: [:revert, :cherry_pick]
@@ -35,25 +32,6 @@ class Projects::CommitController < Projects::ApplicationController
def pipelines
end
- def builds
- end
-
- def cancel_builds
- ci_builds.running_or_pending.each(&:cancel)
-
- redirect_back_or_default default: builds_namespace_project_commit_path(project.namespace, project, commit.sha)
- end
-
- def retry_builds
- ci_builds.latest.failed.each do |build|
- if build.retryable?
- Ci::Build.retry(build, current_user)
- end
- end
-
- redirect_back_or_default default: builds_namespace_project_commit_path(project.namespace, project, commit.sha)
- end
-
def branches
@branches = @project.repository.branch_names_contains(commit.id)
@tags = @project.repository.tag_names_contains(commit.id)
@@ -98,10 +76,6 @@ class Projects::CommitController < Projects::ApplicationController
@noteable = @commit ||= @project.commit(params[:id])
end
- def ci_builds
- @ci_builds ||= Ci::Build.where(pipeline: pipelines)
- end
-
def define_commit_vars
return git_not_found! unless commit
@@ -134,7 +108,6 @@ class Projects::CommitController < Projects::ApplicationController
def define_status_vars
@ci_pipelines = project.pipelines.where(sha: commit.sha)
@statuses = CommitStatus.where(pipeline: @ci_pipelines).relevant
- @builds = Ci::Build.where(pipeline: @ci_pipelines).relevant
end
def assign_change_commit_vars(mr_source_branch)