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
6dcdf071
Commit
6dcdf071
authored
Dec 12, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
All conflicts resolved
parent
0e018648
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
17 additions
and
99 deletions
+17
-99
app/models/namespace.rb
app/models/namespace.rb
+2
-3
app/models/project.rb
app/models/project.rb
+1
-18
app/views/layouts/nav/_group_settings.html.haml
app/views/layouts/nav/_group_settings.html.haml
+0
-3
app/views/projects/_merge_request_settings.html.haml
app/views/projects/_merge_request_settings.html.haml
+0
-3
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+0
-3
app/views/shared/milestones/_summary.html.haml
app/views/shared/milestones/_summary.html.haml
+0
-3
db/schema.rb
db/schema.rb
+1
-10
doc/README.md
doc/README.md
+0
-4
doc/api/merge_requests.md
doc/api/merge_requests.md
+10
-24
lib/api/merge_requests.rb
lib/api/merge_requests.rb
+0
-7
lib/gitlab/search_results.rb
lib/gitlab/search_results.rb
+1
-5
spec/lib/gitlab/import_export/all_models.yml
spec/lib/gitlab/import_export/all_models.yml
+0
-2
spec/models/project_spec.rb
spec/models/project_spec.rb
+0
-3
spec/services/merge_requests/refresh_service_spec.rb
spec/services/merge_requests/refresh_service_spec.rb
+2
-11
No files found.
app/models/namespace.rb
View file @
6dcdf071
...
...
@@ -155,17 +155,16 @@ class Namespace < ActiveRecord::Base
Gitlab
.
config
.
lfs
.
enabled
end
<<<<<<<
HEAD
def
actual_size_limit
current_application_settings
.
repository_size_limit
=======
end
def
full_path
if
parent
parent
.
full_path
+
'/'
+
path
else
path
end
>>>>>>>
ce
/
master
end
private
...
...
app/models/project.rb
View file @
6dcdf071
...
...
@@ -15,11 +15,8 @@ class Project < ActiveRecord::Base
include
Elastic
::
ProjectsSearch
include
ProjectFeaturesCompatibility
include
SelectForProjectAuthorization
<<<<<<<
HEAD
prepend
EE
::
GeoAwareAvatar
=======
include
Routable
>>>>>>>
ce
/
maste
r
prepend
EE
::
GeoAwareAvata
r
extend
Gitlab
::
ConfigHelper
...
...
@@ -1565,22 +1562,8 @@ class Project < ActiveRecord::Base
current_application_settings
.
default_branch_protection
==
Gitlab
::
Access
::
PROTECTION_FULL
||
current_application_settings
.
default_branch_protection
==
Gitlab
::
Access
::
PROTECTION_DEV_CAN_MERGE
end
<<<<<<<
HEAD
=======
# Similar to the normal callbacks that hook into the life cycle of an
# Active Record object, you can also define callbacks that get triggered
# when you add an object to an association collection. If any of these
# callbacks throw an exception, the object will not be added to the
# collection. Before you add a new board to the boards collection if you
# already have 1, 2, or n it will fail, but it if you have 0 that is lower
# than the number of permitted boards per project it won't fail.
def
validate_board_limit
(
board
)
raise
BoardLimitExceeded
,
'Number of permitted boards exceeded'
if
boards
.
size
>=
NUMBER_OF_PERMITTED_BOARDS
end
def
full_path_changed?
path_changed?
||
namespace_id_changed?
end
>>>>>>>
ce
/
master
end
app/views/layouts/nav/_group_settings.html.haml
View file @
6dcdf071
...
...
@@ -14,7 +14,6 @@
=
link_to
'Projects'
,
projects_group_path
(
@group
),
title:
'Projects'
-
if
can_edit
&&
can_admin_group
%li
.divider
<
<<<<<<
HEAD
-
if
can_edit
-
if
ldap_enabled?
=
nav_link
(
controller: :ldap_group_links
)
do
...
...
@@ -29,7 +28,5 @@
=
link_to
group_audit_events_path
(
@group
),
title:
"Audit Events"
do
%span
Audit Events
==
=====
>
>>>>>> ce/master
%li
=
link_to
'Edit Group'
,
edit_group_path
(
@group
)
app/views/projects/_merge_request_settings.html.haml
View file @
6dcdf071
...
...
@@ -5,9 +5,6 @@
%h5
.prepend-top-0
Merge Requests
<
<<<<<<
HEAD
=
render
'projects/ee/merge_request_settings'
,
form:
form
,
project:
@project
==
=====
>
>>>>>> ce/master
=
render
'projects/merge_request_merge_settings'
,
form:
form
app/views/projects/edit.html.haml
View file @
6dcdf071
...
...
@@ -120,11 +120,8 @@
%span
.descr
Enable Container Registry for this project
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'user/project/container_registry'
),
target:
'_blank'
<
<<<<<<
HEAD
=
render
'issues_settings'
,
f:
f
==
=====
>
>>>>>> ce/master
=
render
'merge_request_settings'
,
form:
f
%hr
...
...
app/views/shared/milestones/_summary.html.haml
View file @
6dcdf071
...
...
@@ -29,14 +29,11 @@
-
if
remaining_days
.
present?
%span
.milestone-stat
%span
.remaining-days
=
remaining_days
<
<<<<<<
HEAD
-
total_weight
=
milestone
.
issues_visible_to_user
(
current_user
).
sum
(
:weight
)
-
unless
total_weight
.
zero?
%span
.milestone-stat
Total weight:
%strong
=
total_weight
==
=====
>
>>>>>> ce/master
.milestone-progress-buttons
%span
.tab-issues-buttons
...
...
db/schema.rb
View file @
6dcdf071
...
...
@@ -11,11 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
<<<<<<<
HEAD
ActiveRecord
::
Schema
.
define
(
version:
20161128170531
)
do
=======
ActiveRecord
::
Schema
.
define
(
version:
20161202152035
)
do
>>>>>>>
ce
/
master
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -843,11 +839,8 @@ ActiveRecord::Schema.define(version: 20161202152035) do
t
.
datetime
"deleted_at"
t
.
text
"description_html"
t
.
boolean
"lfs_enabled"
<<<<<<<
HEAD
t
.
integer
"repository_size_limit"
=======
t
.
integer
"parent_id"
>>>>>>>
ce
/
master
end
add_index
"namespaces"
,
[
"created_at"
],
name:
"index_namespaces_on_created_at"
,
using: :btree
...
...
@@ -1163,7 +1156,6 @@ ActiveRecord::Schema.define(version: 20161202152035) do
add_index
"releases"
,
[
"project_id"
,
"tag"
],
name:
"index_releases_on_project_id_and_tag"
,
using: :btree
add_index
"releases"
,
[
"project_id"
],
name:
"index_releases_on_project_id"
,
using: :btree
<<<<<<<
HEAD
create_table
"remote_mirrors"
,
force: :cascade
do
|
t
|
t
.
integer
"project_id"
t
.
string
"url"
...
...
@@ -1180,7 +1172,7 @@ ActiveRecord::Schema.define(version: 20161202152035) do
end
add_index
"remote_mirrors"
,
[
"project_id"
],
name:
"index_remote_mirrors_on_project_id"
,
using: :btree
=======
create_table
"routes"
,
force: :cascade
do
|
t
|
t
.
integer
"source_id"
,
null:
false
t
.
string
"source_type"
,
null:
false
...
...
@@ -1191,7 +1183,6 @@ ActiveRecord::Schema.define(version: 20161202152035) do
add_index
"routes"
,
[
"path"
],
name:
"index_routes_on_path"
,
unique:
true
,
using: :btree
add_index
"routes"
,
[
"source_type"
,
"source_id"
],
name:
"index_routes_on_source_type_and_source_id"
,
unique:
true
,
using: :btree
>>>>>>>
ce
/
master
create_table
"sent_notifications"
,
force: :cascade
do
|
t
|
t
.
integer
"project_id"
...
...
doc/README.md
View file @
6dcdf071
<<<<<<< HEAD
# GitLab Enterprise Edition documentation
=======
# GitLab Community Edition documentation
>>>>>>> ce/master
## User documentation
...
...
doc/api/merge_requests.md
View file @
6dcdf071
...
...
@@ -274,29 +274,6 @@ Creates a new merge request.
POST /projects/:id/merge_requests
```
<<<<<<< HEAD
Parameters:
-
`id`
(required) - The ID of a project
-
`source_branch`
(required) - The source branch
-
`target_branch`
(required) - The target branch
-
`assignee_id`
(optional) - Assignee user ID
-
`title`
(required) - Title of MR
-
`description`
(optional) - Description of MR
-
`target_project_id`
(optional) - The target project (numeric id)
-
`labels`
(optional) - Labels for MR as a comma-separated list
-
`milestone_id`
(optional) - Milestone ID
-
`approvals_before_merge`
(optional) - Number of approvals required before this can be merged (see below)
If
`approvals_before_merge`
is not provided, it inherits the value from the
target project. If it is provided, then the following conditions must hold in
order for it to take effect:
1.
The target project's
`approvals_before_merge`
must be greater than zero. (A
value of zero disables approvals for that project.)
2.
The provided value of
`approvals_before_merge`
must be greater than the
target project's `approvals_before_merge`.
=======
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
|
`id`
| string | yes | The ID of a project |
...
...
@@ -309,7 +286,16 @@ order for it to take effect:
|
`labels`
| string | no | Labels for MR as a comma-separated list |
|
`milestone_id`
| integer | no | The ID of a milestone |
|
`remove_source_branch`
| boolean | no | Flag indicating if a merge request should remove the source branch when merging |
>>>>>>> ce/master
|
`approvals_before_merge`
| integer| no | Number of approvals required before this can be merged (see below) |
If
`approvals_before_merge`
is not provided, it inherits the value from the
target project. If it is provided, then the following conditions must hold in
order for it to take effect:
1.
The target project's
`approvals_before_merge`
must be greater than zero. (A
value of zero disables approvals for that project.)
2.
The provided value of
`approvals_before_merge`
must be greater than the
target project's
`approvals_before_merge`
.
```
json
{
...
...
lib/api/merge_requests.rb
View file @
6dcdf071
...
...
@@ -30,11 +30,8 @@ module API
optional
:assignee_id
,
type:
Integer
,
desc:
'The ID of a user to assign the merge request'
optional
:milestone_id
,
type:
Integer
,
desc:
'The ID of a milestone to assign the merge request'
optional
:labels
,
type:
String
,
desc:
'Comma-separated list of label names'
<<<<<<<
HEAD
optional
:approvals_before_merge
,
type:
Integer
,
desc:
'Number of approvals required before this can be merged'
=======
optional
:remove_source_branch
,
type:
Boolean
,
desc:
'Remove source branch when merging'
>>>>>>>
ce
/
master
end
end
...
...
@@ -153,12 +150,8 @@ module API
desc:
'Status of the merge request'
use
:optional_params
at_least_one_of
:title
,
:target_branch
,
:description
,
:assignee_id
,
<<<<<<<
HEAD
:milestone_id
,
:labels
,
:state_event
,
:approvals_before_merge
=======
:milestone_id
,
:labels
,
:state_event
,
:remove_source_branch
>>>>>>>
ce
/
master
end
put
path
do
merge_request
=
user_project
.
merge_requests
.
find
(
params
.
delete
(
:merge_request_id
))
...
...
lib/gitlab/search_results.rb
View file @
6dcdf071
...
...
@@ -68,12 +68,8 @@ module Gitlab
end
def
merge_requests
<<<<<<<
HEAD
merge_requests
=
MergeRequest
.
in_projects
(
project_ids_relation
)
=======
merge_requests
=
MergeRequestsFinder
.
new
(
current_user
).
execute
.
in_projects
(
project_ids_relation
)
>>>>>>>
ce
/
master
if
query
=~
/[#!](\d+)\z/
merge_requests
=
merge_requests
.
where
(
iid:
$1
)
else
...
...
spec/lib/gitlab/import_export/all_models.yml
View file @
6dcdf071
...
...
@@ -209,9 +209,7 @@ project:
-
remote_mirrors
-
path_locks
-
approver_groups
=======
-
route
>
>>>>>>
ce/master
award_emoji
:
-
awardable
-
user
...
...
spec/models/project_spec.rb
View file @
6dcdf071
...
...
@@ -1761,7 +1761,6 @@ describe Project, models: true do
end
end
<<<<<<<
HEAD
describe
'.where_paths_in'
do
context
'without any paths'
do
it
'returns an empty relation'
do
...
...
@@ -1856,8 +1855,6 @@ describe Project, models: true do
end
end
=======
>>>>>>>
ce
/
master
describe
'change_head'
do
let
(
:project
)
{
create
(
:project
)
}
...
...
spec/services/merge_requests/refresh_service_spec.rb
View file @
6dcdf071
...
...
@@ -148,22 +148,14 @@ describe MergeRequests::RefreshService, services: true do
it
{
expect
(
@merge_request
.
notes
).
to
be_empty
}
it
{
expect
(
@merge_request
).
to
be_open
}
it
{
expect
(
@merge_request
.
approvals
).
not_to
be_empty
}
it
{
expect
(
@fork_merge_request
.
notes
).
to
be_empty
}
it
{
expect
(
@fork_merge_request
).
to
be_open
}
it
{
expect
(
@fork_merge_request
.
approvals
).
not_to
be_empty
}
it
{
expect
(
@build_failed_todo
).
to
be_pending
}
it
{
expect
(
@fork_build_failed_todo
).
to
be_pending
}
end
<<<<<<<
HEAD
it
{
expect
(
@merge_request
.
notes
).
to
be_empty
}
it
{
expect
(
@merge_request
).
to
be_open
}
it
{
expect
(
@merge_request
.
approvals
).
not_to
be_empty
}
it
{
expect
(
@fork_merge_request
.
notes
).
to
be_empty
}
it
{
expect
(
@fork_merge_request
).
to
be_open
}
it
{
expect
(
@build_failed_todo
).
to
be_pending
}
it
{
expect
(
@fork_build_failed_todo
).
to
be_pending
}
it
{
expect
(
@fork_merge_request
.
approvals
).
not_to
be_empty
}
=======
describe
'merge request diff'
do
it
'does not reload the diff of the merge request made from fork'
do
expect
do
...
...
@@ -171,7 +163,6 @@ describe MergeRequests::RefreshService, services: true do
end
.
not_to
change
{
@fork_merge_request
.
reload
.
merge_request_diff
}
end
end
>>>>>>>
ce
/
master
end
context
'push to origin repo target branch after fork project was removed'
do
...
...
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