diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-10-07 15:24:32 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-10-07 15:24:32 +0200 |
commit | 1e06cabf4a8fa4d4c7acb9898682a5b4b41a9f58 (patch) | |
tree | 1dc00333ddcb0d926bf289312b05ff14a6f81949 /app/controllers/projects/commit_controller.rb | |
parent | 3fa2cb93353720e1b70e01ec9e664ebf54d1fc29 (diff) | |
download | gitlab-ce-1e06cabf4a8fa4d4c7acb9898682a5b4b41a9f58.tar.gz |
Remove Ci::Commit and Ci::Build controllerscleanup-ci-pages
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 1938c63c10c..c08a90bddf0 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -38,6 +38,14 @@ class Projects::CommitController < Projects::ApplicationController @ci_project = @project.gitlab_ci_project end + def cancel_builds + @ci_commit = @project.ci_commit(@commit.sha) + @ci_commit.builds.running_or_pending.each(&:cancel) + + redirect_to 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) |