BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
f8cb5fd6
Commit
f8cb5fd6
authored
May 13, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add own! method on PipleineSchedule
parent
8743f765
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
pipeline_schedule.rb
app/models/ci/pipeline_schedule.rb
+4
-0
pipeline_schedules.rb
lib/api/pipeline_schedules.rb
+1
-1
No files found.
app/models/ci/pipeline_schedule.rb
View file @
f8cb5fd6
...
@@ -24,6 +24,10 @@ module Ci
...
@@ -24,6 +24,10 @@ module Ci
owner
==
current_user
owner
==
current_user
end
end
def
own!
(
user
)
update!
(
owner:
user
)
end
def
inactive?
def
inactive?
!
active?
!
active?
end
end
...
...
lib/api/pipeline_schedules.rb
View file @
f8cb5fd6
...
@@ -100,7 +100,7 @@ module API
...
@@ -100,7 +100,7 @@ module API
pipeline_schedule
=
user_project
.
pipeline_schedules
.
find
(
params
.
delete
(
:pipeline_schedule_id
))
pipeline_schedule
=
user_project
.
pipeline_schedules
.
find
(
params
.
delete
(
:pipeline_schedule_id
))
return
not_found!
(
'PipelineSchedule'
)
unless
pipeline_schedule
return
not_found!
(
'PipelineSchedule'
)
unless
pipeline_schedule
if
pipeline_schedule
.
update
(
owner:
current_user
)
if
pipeline_schedule
.
own!
(
current_user
)
status
:ok
status
:ok
present
pipeline_schedule
,
with:
Entities
::
PipelineSchedule
present
pipeline_schedule
,
with:
Entities
::
PipelineSchedule
else
else
...
...
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