Commit 97fbd3ee authored by Gabriel Mazetto's avatar Gabriel Mazetto

Merge branch 'pb-use-new-pipelines-table-for-commit' into 'master'

Ensure new pipelines table is used for commits

See merge request gitlab-org/gitlab!55995
parents 0d347294 1f7bb57f
......@@ -50,6 +50,8 @@ class Projects::CommitController < Projects::ApplicationController
# rubocop: disable CodeReuse/ActiveRecord
def pipelines
set_pipeline_feature_flag
@pipelines = @commit.pipelines.order(id: :desc)
@pipelines = @pipelines.where(ref: params[:ref]).page(params[:page]).per(30) if params[:ref]
......@@ -124,6 +126,10 @@ class Projects::CommitController < Projects::ApplicationController
private
def set_pipeline_feature_flag
push_frontend_feature_flag(:new_pipelines_table, @project, default_enabled: :yaml)
end
def create_new_branch?
params[:create_merge_request].present? || !can?(current_user, :push_code, @project)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment