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
7327fb4a
Commit
7327fb4a
authored
Dec 19, 2018
by
Grzegorz Bizon
Committed by
Yorick Peterse
Jan 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Present all pipeline triggers using trigger presenter
parent
084b7edb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
app/controllers/projects/settings/ci_cd_controller.rb
app/controllers/projects/settings/ci_cd_controller.rb
+2
-0
app/models/ci/trigger.rb
app/models/ci/trigger.rb
+1
-1
lib/api/triggers.rb
lib/api/triggers.rb
+3
-3
No files found.
app/controllers/projects/settings/ci_cd_controller.rb
View file @
7327fb4a
...
...
@@ -99,7 +99,9 @@ module Projects
def
define_triggers_variables
@triggers
=
@project
.
triggers
.
present
(
current_user:
current_user
)
@trigger
=
::
Ci
::
Trigger
.
new
.
present
(
current_user:
current_user
)
end
def
define_badges_variables
...
...
app/models/ci/trigger.rb
View file @
7327fb4a
...
...
@@ -30,7 +30,7 @@ module Ci
end
def
short_token
token
[
0
...
4
]
token
[
0
...
4
]
if
token
.
present?
end
def
legacy?
...
...
lib/api/triggers.rb
View file @
7327fb4a
...
...
@@ -85,7 +85,7 @@ module API
declared_params
(
include_missing:
false
).
merge
(
owner:
current_user
))
if
trigger
.
valid?
present
trigger
,
with:
Entities
::
Trigger
present
trigger
,
with:
Entities
::
Trigger
,
current_user:
current_user
else
render_validation_error!
(
trigger
)
end
...
...
@@ -106,7 +106,7 @@ module API
break
not_found!
(
'Trigger'
)
unless
trigger
if
trigger
.
update
(
declared_params
(
include_missing:
false
))
present
trigger
,
with:
Entities
::
Trigger
present
trigger
,
with:
Entities
::
Trigger
,
current_user:
current_user
else
render_validation_error!
(
trigger
)
end
...
...
@@ -127,7 +127,7 @@ module API
if
trigger
.
update
(
owner:
current_user
)
status
:ok
present
trigger
,
with:
Entities
::
Trigger
present
trigger
,
with:
Entities
::
Trigger
,
current_user:
current_user
else
render_validation_error!
(
trigger
)
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