diff options
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) |