diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-10-15 11:47:36 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-10-15 11:47:36 +0200 |
commit | c993481d991333fe0750080eec98fd2e9eeda8d5 (patch) | |
tree | 7d1fdd7926f8542b7fbf7add052004dbfd48b206 /app/controllers/projects/commit_controller.rb | |
parent | 83f04853e9a749c3397ee7683a78b986e1070904 (diff) | |
parent | 123669a55107514798ba531ba3a744b3ec8503ee (diff) | |
download | gitlab-ce-git-archive-golang.tar.gz |
Merge branch 'master' into git-archive-golanggit-archive-golang
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 2fae5057138..7886f3c6deb 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -31,6 +31,21 @@ class Projects::CommitController < Projects::ApplicationController end end + def ci + @ci_commit = @project.ci_commit(@commit.sha) + @builds = @ci_commit.builds if @ci_commit + @notes_count = @commit.notes.count + @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 ci_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) |