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
2f418b77
Commit
2f418b77
authored
Jul 12, 2019
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Protect against triggering invalid build actions
parent
ca92c9ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
ee/app/models/ee/ci/bridge.rb
ee/app/models/ee/ci/bridge.rb
+6
-0
No files found.
ee/app/models/ee/ci/bridge.rb
View file @
2f418b77
...
@@ -5,6 +5,8 @@ module EE
...
@@ -5,6 +5,8 @@ module EE
module
Bridge
module
Bridge
extend
ActiveSupport
::
Concern
extend
ActiveSupport
::
Concern
InvalidBridgeTypeError
=
Class
.
new
(
StandardError
)
prepended
do
prepended
do
include
::
Ci
::
Metadatable
include
::
Ci
::
Metadatable
...
@@ -35,10 +37,14 @@ module EE
...
@@ -35,10 +37,14 @@ module EE
end
end
def
schedule_downstream_pipeline!
def
schedule_downstream_pipeline!
raise
InvalidBridgeTypeError
unless
downstream_project
::
Ci
::
CreateCrossProjectPipelineWorker
.
perform_async
(
self
.
id
)
::
Ci
::
CreateCrossProjectPipelineWorker
.
perform_async
(
self
.
id
)
end
end
def
subscribe_to_upstream!
def
subscribe_to_upstream!
raise
InvalidBridgeTypeError
unless
upstream_project
::
Ci
::
SubscribeBridgeService
.
new
(
self
.
project
,
self
.
user
).
execute
(
self
)
::
Ci
::
SubscribeBridgeService
.
new
(
self
.
project
,
self
.
user
).
execute
(
self
)
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