Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1f7bb57f
Commit
1f7bb57f
authored
Mar 09, 2021
by
Payton Burdette
Committed by
Gabriel Mazetto
Mar 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Push FE flag
Ensure new table is used on commits.
parent
0d347294
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
app/controllers/projects/commit_controller.rb
app/controllers/projects/commit_controller.rb
+6
-0
No files found.
app/controllers/projects/commit_controller.rb
View file @
1f7bb57f
...
@@ -50,6 +50,8 @@ class Projects::CommitController < Projects::ApplicationController
...
@@ -50,6 +50,8 @@ class Projects::CommitController < Projects::ApplicationController
# rubocop: disable CodeReuse/ActiveRecord
# rubocop: disable CodeReuse/ActiveRecord
def
pipelines
def
pipelines
set_pipeline_feature_flag
@pipelines
=
@commit
.
pipelines
.
order
(
id: :desc
)
@pipelines
=
@commit
.
pipelines
.
order
(
id: :desc
)
@pipelines
=
@pipelines
.
where
(
ref:
params
[
:ref
]).
page
(
params
[
:page
]).
per
(
30
)
if
params
[
:ref
]
@pipelines
=
@pipelines
.
where
(
ref:
params
[
:ref
]).
page
(
params
[
:page
]).
per
(
30
)
if
params
[
:ref
]
...
@@ -124,6 +126,10 @@ class Projects::CommitController < Projects::ApplicationController
...
@@ -124,6 +126,10 @@ class Projects::CommitController < Projects::ApplicationController
private
private
def
set_pipeline_feature_flag
push_frontend_feature_flag
(
:new_pipelines_table
,
@project
,
default_enabled: :yaml
)
end
def
create_new_branch?
def
create_new_branch?
params
[
:create_merge_request
].
present?
||
!
can?
(
current_user
,
:push_code
,
@project
)
params
[
:create_merge_request
].
present?
||
!
can?
(
current_user
,
:push_code
,
@project
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment