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
90752145
Commit
90752145
authored
Feb 15, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve conflicts
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
600d9d07
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
103 deletions
+23
-103
.rubocop_todo.yml
.rubocop_todo.yml
+0
-12
CHANGELOG.md
CHANGELOG.md
+0
-3
app/assets/javascripts/api.js
app/assets/javascripts/api.js
+0
-3
app/controllers/projects/wikis_controller.rb
app/controllers/projects/wikis_controller.rb
+0
-9
app/services/wiki_pages/destroy_service.rb
app/services/wiki_pages/destroy_service.rb
+3
-0
db/schema.rb
db/schema.rb
+0
-3
doc/api/projects.md
doc/api/projects.md
+0
-4
spec/lib/gitlab/regex_spec.rb
spec/lib/gitlab/regex_spec.rb
+0
-48
spec/services/todo_service_spec.rb
spec/services/todo_service_spec.rb
+20
-21
No files found.
.rubocop_todo.yml
View file @
90752145
...
...
@@ -21,11 +21,7 @@ Lint/AmbiguousRegexpLiteral:
Lint/AssignmentInCondition
:
Enabled
:
false
<<<<<<< HEAD
# Offense count: 22
=======
# Offense count: 20
>
>>>>>>
ce/master
Lint/HandleExceptions
:
Enabled
:
false
...
...
@@ -80,20 +76,12 @@ Performance/RedundantMatch:
Performance/RedundantMerge
:
Enabled
:
false
<
<<<<<< HEAD
# Offense count: 26
=
======
#
Offense count: 15
>
>>>>>> ce/master
# Configuration parameters: CustomIncludeMethods.
RSpec/EmptyExampleGroup
:
Enabled
:
false
<
<<<<<< HEAD
# Offense count: 83
=
======
#
Offense count: 58
>
>>>>>> ce/master
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: implicit, each, example
RSpec/HookArgument
:
...
...
CHANGELOG.md
View file @
90752145
...
...
@@ -188,7 +188,6 @@ entry.
-
Prevent the GitHub importer from assigning labels and comments to merge requests or issues belonging to other projects.
-
Patch XSS vulnerability in RDOC support.
<<<<<<< HEAD
## 8.15.5 (2017-01-20)
-
Ensure export files are removed after a namespace is deleted.
...
...
@@ -197,8 +196,6 @@ entry.
-
Prevent users from deleting system deploy keys via the project deploy key API.
-
Upgrade omniauth gem to 1.3.2.
=======
>>>>>>> ce/master
## 8.15.4 (2017-01-09)
-
Make successful pipeline emails off for watchers. !8176
...
...
app/assets/javascripts/api.js
View file @
90752145
...
...
@@ -11,10 +11,7 @@
licensePath
:
"
/api/:version/templates/licenses/:key
"
,
gitignorePath
:
"
/api/:version/templates/gitignores/:key
"
,
gitlabCiYmlPath
:
"
/api/:version/templates/gitlab_ci_ymls/:key
"
,
<<<<<<<
HEAD
ldapGroupsPath
:
"
/api/:version/ldap/:provider/groups.json
"
,
=======
>>>>>>>
ce
/
master
dockerfilePath
:
"
/api/:version/templates/dockerfiles/:key
"
,
issuableTemplatePath
:
"
/:namespace_path/:project_path/templates/:type/:key
"
,
group
:
function
(
group_id
,
callback
)
{
...
...
app/controllers/projects/wikis_controller.rb
View file @
90752145
...
...
@@ -88,17 +88,8 @@ class Projects::WikisController < Projects::ApplicationController
def
destroy
@page
=
@project_wiki
.
find_page
(
params
[
:id
])
<<<<<<<
HEAD
if
@page
@page
.
delete
# Triggers repository update on secondary nodes when Geo is enabled
Gitlab
::
Geo
.
notify_wiki_update
(
@project
)
if
Gitlab
::
Geo
.
primary?
end
=======
WikiPages
::
DestroyService
.
new
(
@project
,
current_user
).
execute
(
@page
)
>>>>>>>
ce
/
master
redirect_to
(
namespace_project_wiki_path
(
@project
.
namespace
,
@project
,
:home
),
...
...
app/services/wiki_pages/destroy_service.rb
View file @
90752145
...
...
@@ -3,6 +3,9 @@ module WikiPages
def
execute
(
page
)
if
page
&
.
delete
execute_hooks
(
page
,
'delete'
)
# Triggers repository update on secondary nodes when Geo is enabled
Gitlab
::
Geo
.
notify_wiki_update
(
project
)
if
Gitlab
::
Geo
.
primary?
end
page
...
...
db/schema.rb
View file @
90752145
...
...
@@ -1464,11 +1464,8 @@ ActiveRecord::Schema.define(version: 20170210075922) do
t
.
string
"incoming_email_token"
t
.
string
"organization"
t
.
boolean
"authorized_projects_populated"
<<<<<<<
HEAD
t
.
boolean
"auditor"
,
default:
false
,
null:
false
=======
t
.
boolean
"notified_of_own_activity"
,
default:
false
,
null:
false
>>>>>>>
ce
/
master
end
add_index
"users"
,
[
"admin"
],
name:
"index_users_on_admin"
,
using: :btree
...
...
doc/api/projects.md
View file @
90752145
...
...
@@ -1201,7 +1201,6 @@ Parameters:
| --------- | ---- | -------- | ----------- |
|
`query`
| string | yes | A string contained in the project name |
|
`order_by`
| string | no | Return requests ordered by
`id`
,
`name`
,
`created_at`
or
`last_activity_at`
fields |
<<<<<<< HEAD
|
`sort`
| string | no | Return requests sorted in
`asc`
or
`desc`
order |
## Push Rules (EE only)
...
...
@@ -1291,6 +1290,3 @@ Parameters:
Note the JSON response differs if the push rule is available or not. If the project push rule
is available before it is returned in the JSON response or an empty response is returned.
=======
|
`sort`
| string | no | Return requests sorted in
`asc`
or
`desc`
order |
>>>>>>> ce/master
spec/lib/gitlab/regex_spec.rb
View file @
90752145
...
...
@@ -4,53 +4,6 @@ require 'spec_helper'
describe
Gitlab
::
Regex
,
lib:
true
do
describe
'.project_path_regex'
do
subject
{
described_class
.
project_path_regex
}
<<<<<<<
HEAD
it
{
is_expected
.
to
match
(
'gitlab-ce'
)
}
it
{
is_expected
.
to
match
(
'gitlab_git'
)
}
it
{
is_expected
.
to
match
(
'_underscore.js'
)
}
it
{
is_expected
.
to
match
(
'100px.com'
)
}
it
{
is_expected
.
not_to
match
(
'?gitlab'
)
}
it
{
is_expected
.
not_to
match
(
'git lab'
)
}
it
{
is_expected
.
not_to
match
(
'gitlab.git'
)
}
end
describe
'.project_name_regex'
do
subject
{
described_class
.
project_name_regex
}
it
{
is_expected
.
to
match
(
'gitlab-ce'
)
}
it
{
is_expected
.
to
match
(
'GitLab CE'
)
}
it
{
is_expected
.
to
match
(
'100 lines'
)
}
it
{
is_expected
.
to
match
(
'gitlab.git'
)
}
it
{
is_expected
.
to
match
(
'Český název'
)
}
it
{
is_expected
.
to
match
(
'Dash – is this'
)
}
it
{
is_expected
.
not_to
match
(
'?gitlab'
)
}
end
describe
'.file_name_regex'
do
subject
{
described_class
.
file_name_regex
}
it
{
is_expected
.
to
match
(
'foo@bar'
)
}
end
describe
'.file_path_regex'
do
subject
{
described_class
.
file_path_regex
}
it
{
is_expected
.
to
match
(
'foo@/bar'
)
}
end
describe
'.environment_slug_regex'
do
subject
{
described_class
.
environment_slug_regex
}
it
{
is_expected
.
to
match
(
'foo'
)
}
it
{
is_expected
.
to
match
(
'foo-1'
)
}
it
{
is_expected
.
not_to
match
(
'FOO'
)
}
it
{
is_expected
.
not_to
match
(
'foo/1'
)
}
it
{
is_expected
.
not_to
match
(
'foo.1'
)
}
it
{
is_expected
.
not_to
match
(
'foo*1'
)
}
it
{
is_expected
.
not_to
match
(
'9foo'
)
}
it
{
is_expected
.
not_to
match
(
'foo-'
)
}
=======
it
{
is_expected
.
to
match
(
'gitlab-ce'
)
}
it
{
is_expected
.
to
match
(
'gitlab_git'
)
}
...
...
@@ -108,6 +61,5 @@ describe Gitlab::Regex, lib: true do
it
{
is_expected
.
not_to
match
(
'/gitlab.org'
)
}
it
{
is_expected
.
not_to
match
(
'gitlab.git'
)
}
it
{
is_expected
.
not_to
match
(
'gitlab git'
)
}
>>>>>>>
ce
/
master
end
end
spec/services/todo_service_spec.rb
View file @
90752145
...
...
@@ -480,7 +480,25 @@ describe TodoService, services: true do
should_not_create_todo
(
user:
non_member
,
target:
mr_assigned
,
action:
Todo
::
MENTIONED
)
end
<<<<<<<
HEAD
it
'creates a todo for each valid user based on the type of mention'
do
mr_assigned
.
update
(
description:
directly_addressed_and_mentioned
)
service
.
new_merge_request
(
mr_assigned
,
author
)
should_create_todo
(
user:
member
,
target:
mr_assigned
,
action:
Todo
::
DIRECTLY_ADDRESSED
)
should_create_todo
(
user:
admin
,
target:
mr_assigned
,
action:
Todo
::
MENTIONED
)
end
it
'creates a directly addressed todo for each valid addressed user'
do
service
.
new_merge_request
(
addressed_mr_assigned
,
author
)
should_create_todo
(
user:
member
,
target:
addressed_mr_assigned
,
action:
Todo
::
DIRECTLY_ADDRESSED
)
should_not_create_todo
(
user:
guest
,
target:
addressed_mr_assigned
,
action:
Todo
::
DIRECTLY_ADDRESSED
)
should_create_todo
(
user:
author
,
target:
addressed_mr_assigned
,
action:
Todo
::
DIRECTLY_ADDRESSED
)
should_not_create_todo
(
user:
john_doe
,
target:
addressed_mr_assigned
,
action:
Todo
::
DIRECTLY_ADDRESSED
)
should_not_create_todo
(
user:
non_member
,
target:
addressed_mr_assigned
,
action:
Todo
::
DIRECTLY_ADDRESSED
)
end
context
'when the merge request has approvers'
do
let
(
:approver_1
)
{
create
(
:user
)
}
let
(
:approver_2
)
{
create
(
:user
)
}
...
...
@@ -509,25 +527,6 @@ describe TodoService, services: true do
should_create_todo
(
user:
john_doe
,
target:
mr_approvers
,
action:
Todo
::
MENTIONED
)
should_not_create_todo
(
user:
approver_1
,
target:
mr_approvers
,
action:
Todo
::
MENTIONED
)
end
=======
it
'creates a todo for each valid user based on the type of mention'
do
mr_assigned
.
update
(
description:
directly_addressed_and_mentioned
)
service
.
new_merge_request
(
mr_assigned
,
author
)
should_create_todo
(
user:
member
,
target:
mr_assigned
,
action:
Todo
::
DIRECTLY_ADDRESSED
)
should_create_todo
(
user:
admin
,
target:
mr_assigned
,
action:
Todo
::
MENTIONED
)
end
it
'creates a directly addressed todo for each valid addressed user'
do
service
.
new_merge_request
(
addressed_mr_assigned
,
author
)
should_create_todo
(
user:
member
,
target:
addressed_mr_assigned
,
action:
Todo
::
DIRECTLY_ADDRESSED
)
should_not_create_todo
(
user:
guest
,
target:
addressed_mr_assigned
,
action:
Todo
::
DIRECTLY_ADDRESSED
)
should_create_todo
(
user:
author
,
target:
addressed_mr_assigned
,
action:
Todo
::
DIRECTLY_ADDRESSED
)
should_not_create_todo
(
user:
john_doe
,
target:
addressed_mr_assigned
,
action:
Todo
::
DIRECTLY_ADDRESSED
)
should_not_create_todo
(
user:
non_member
,
target:
addressed_mr_assigned
,
action:
Todo
::
DIRECTLY_ADDRESSED
)
>>>>>>>
ce
/
master
end
end
...
...
@@ -725,7 +724,7 @@ describe TodoService, services: true do
should_create_todo
(
user:
admin
,
author:
admin
,
target:
mr_unassigned
,
action:
Todo
::
UNMERGEABLE
)
end
end
describe
'#mark_todo'
do
it
'creates a todo from a merge request'
do
service
.
mark_todo
(
mr_unassigned
,
author
)
...
...
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