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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
9b598fa6
Commit
9b598fa6
authored
Apr 03, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix MR fork validation and services load
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
9ee697dd
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
7 deletions
+11
-7
app/models/merge_request.rb
app/models/merge_request.rb
+3
-1
app/services/merge_requests/create_service.rb
app/services/merge_requests/create_service.rb
+1
-1
app/services/merge_requests/update_service.rb
app/services/merge_requests/update_service.rb
+4
-0
features/steps/dashboard/merge_requests.rb
features/steps/dashboard/merge_requests.rb
+3
-3
features/support/env.rb
features/support/env.rb
+0
-2
No files found.
app/models/merge_request.rb
View file @
9b598fa6
...
...
@@ -127,7 +127,9 @@ class MergeRequest < ActiveRecord::Base
end
def
validate_fork
if
target_projet
==
source_project
return
true
unless
target_project
&&
source_project
if
target_project
==
source_project
true
else
# If source and target projects are different
...
...
app/services/merge_requests/create_service.rb
View file @
9b598fa6
module
MergeReques
module
MergeReques
ts
class
CreateService
<
MergeRequests
::
BaseService
def
execute
merge_request
=
MergeRequest
.
new
(
params
)
...
...
app/services/merge_requests/update_service.rb
View file @
9b598fa6
require_relative
'base_service'
require_relative
'reopen_service'
require_relative
'close_service'
module
MergeRequests
class
UpdateService
<
MergeRequests
::
BaseService
def
execute
(
merge_request
)
...
...
features/steps/dashboard/merge_requests.rb
View file @
9b598fa6
...
...
@@ -53,15 +53,15 @@ class DashboardMergeRequests < Spinach::FeatureSteps
end
def
assigned_merge_request
@assigned_merge_request
||=
create
:merge_request
,
assignee:
current_user
,
target_project:
project
@assigned_merge_request
||=
create
:merge_request
,
assignee:
current_user
,
target_project:
project
,
source_project:
project
end
def
authored_merge_request
@authored_merge_request
||=
create
:merge_request
,
author:
current_user
,
target
_project:
project
@authored_merge_request
||=
create
:merge_request
,
source_branch:
'simple_merge_request'
,
author:
current_user
,
target_project:
project
,
source
_project:
project
end
def
other_merge_request
@other_merge_request
||=
create
:merge_request
,
target
_project:
project
@other_merge_request
||=
create
:merge_request
,
source_branch:
'2_3_notes_fix'
,
target_project:
project
,
source
_project:
project
end
def
project
...
...
features/support/env.rb
View file @
9b598fa6
...
...
@@ -52,6 +52,4 @@ Spinach.hooks.before_run do
RSpec
::
Mocks
::
setup
self
include
FactoryGirl
::
Syntax
::
Methods
MergeRequestObserver
.
any_instance
.
stub
(
current_user:
create
(
:user
))
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