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
0603cfbb
Commit
0603cfbb
authored
May 06, 2017
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve a bunch of conflicts
parent
6a733664
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
1 addition
and
192 deletions
+1
-192
app/controllers/projects/deploy_keys_controller.rb
app/controllers/projects/deploy_keys_controller.rb
+1
-8
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+0
-4
app/models/issue_assignee.rb
app/models/issue_assignee.rb
+0
-6
app/models/merge_request.rb
app/models/merge_request.rb
+0
-3
app/serializers/merge_request_entity.rb
app/serializers/merge_request_entity.rb
+0
-3
app/services/issues/base_service.rb
app/services/issues/base_service.rb
+0
-6
app/services/notification_service.rb
app/services/notification_service.rb
+0
-7
app/services/slash_commands/interpret_service.rb
app/services/slash_commands/interpret_service.rb
+0
-26
app/services/system_note_service.rb
app/services/system_note_service.rb
+0
-4
app/views/issues/_issue.atom.builder
app/views/issues/_issue.atom.builder
+0
-6
db/migrate/20170320171632_create_issue_assignees_table.rb
db/migrate/20170320171632_create_issue_assignees_table.rb
+0
-4
lib/api/issues.rb
lib/api/issues.rb
+0
-4
lib/api/v3/issues.rb
lib/api/v3/issues.rb
+0
-4
lib/gitlab/import_export/import_export.yml
lib/gitlab/import_export/import_export.yml
+0
-3
spec/features/atom/issues_spec.rb
spec/features/atom/issues_spec.rb
+0
-8
spec/features/dashboard/issuables_counter_spec.rb
spec/features/dashboard/issuables_counter_spec.rb
+0
-3
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+0
-3
spec/finders/issues_finder_spec.rb
spec/finders/issues_finder_spec.rb
+0
-16
spec/models/group_spec.rb
spec/models/group_spec.rb
+0
-3
spec/models/project_spec.rb
spec/models/project_spec.rb
+0
-5
spec/models/user_spec.rb
spec/models/user_spec.rb
+0
-3
spec/requests/api/issues_spec.rb
spec/requests/api/issues_spec.rb
+0
-31
spec/requests/api/v3/issues_spec.rb
spec/requests/api/v3/issues_spec.rb
+0
-10
spec/services/issues/update_service_spec.rb
spec/services/issues/update_service_spec.rb
+0
-8
spec/services/slash_commands/interpret_service_spec.rb
spec/services/slash_commands/interpret_service_spec.rb
+0
-7
spec/services/system_note_service_spec.rb
spec/services/system_note_service_spec.rb
+0
-4
spec/workers/post_receive_spec.rb
spec/workers/post_receive_spec.rb
+0
-3
No files found.
app/controllers/projects/deploy_keys_controller.rb
View file @
0603cfbb
...
...
@@ -25,12 +25,10 @@ class Projects::DeployKeysController < Projects::ApplicationController
unless
@key
.
valid?
&&
@project
.
deploy_keys
<<
@key
flash
[
:alert
]
=
@key
.
errors
.
full_messages
.
join
(
', '
).
html_safe
<<<<<<<
HEAD
else
log_audit_event
(
@key
.
title
,
action: :create
)
=======
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
end
redirect_to_repository_settings
(
@project
)
end
...
...
@@ -51,17 +49,12 @@ class Projects::DeployKeysController < Projects::ApplicationController
load_key
deploy_key_project
.
destroy!
<<<<<<<
HEAD
log_audit_event
(
@key
.
title
,
action: :destroy
)
redirect_to_repository_settings
(
@project
)
=======
respond_to
do
|
format
|
format
.
html
{
redirect_to_repository_settings
(
@project
)
}
format
.
json
{
head
:ok
}
end
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
end
protected
...
...
app/controllers/projects/issues_controller.rb
View file @
0603cfbb
...
...
@@ -291,11 +291,7 @@ class Projects::IssuesController < Projects::ApplicationController
def
issue_params
params
.
require
(
:issue
).
permit
(
<<<<<<<
HEAD
:title
,
:position
,
:description
,
:confidential
,
:weight
,
=======
:title
,
:assignee_id
,
:position
,
:description
,
:confidential
,
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
:milestone_id
,
:due_date
,
:state_event
,
:task_num
,
:lock_version
,
label_ids:
[],
assignee_ids:
[],
)
end
...
...
app/models/issue_assignee.rb
View file @
0603cfbb
...
...
@@ -7,7 +7,6 @@ class IssueAssignee < ActiveRecord::Base
after_create
:update_assignee_cache_counts
after_destroy
:update_assignee_cache_counts
<<<<<<<
HEAD
# EE-specific
after_create
:update_elasticsearch_index
after_destroy
:update_elasticsearch_index
...
...
@@ -27,9 +26,4 @@ class IssueAssignee < ActiveRecord::Base
)
end
end
=======
def
update_assignee_cache_counts
assignee
&
.
update_cache_counts
end
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
end
app/models/merge_request.rb
View file @
0603cfbb
...
...
@@ -125,10 +125,7 @@ class MergeRequest < ActiveRecord::Base
scope
:unassigned
,
->
{
where
(
"assignee_id IS NULL"
)
}
scope
:assigned_to
,
->
(
u
)
{
where
(
assignee_id:
u
.
id
)}
<<<<<<<
HEAD
participant
:approvers_left
=======
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
participant
:assignee
after_save
:keep_around_commit
...
...
app/serializers/merge_request_entity.rb
View file @
0603cfbb
class
MergeRequestEntity
<
IssuableEntity
<<<<<<<
HEAD
expose
:approvals_before_merge
=======
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
expose
:assignee_id
expose
:in_progress_merge_commit_sha
expose
:locked_at
...
...
app/services/issues/base_service.rb
View file @
0603cfbb
...
...
@@ -24,12 +24,6 @@ module Issues
def
filter_assignee
(
issuable
)
return
if
params
[
:assignee_ids
].
blank?
<<<<<<<
HEAD
=======
# The number of assignees is limited by one for GitLab CE
params
[
:assignee_ids
]
=
params
[
:assignee_ids
][
0
,
1
]
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
assignee_ids
=
params
[
:assignee_ids
].
select
{
|
assignee_id
|
assignee_can_read?
(
issuable
,
assignee_id
)
}
if
params
[
:assignee_ids
].
map
(
&
:to_s
)
==
[
IssuableFinder
::
NONE
]
...
...
app/services/notification_service.rb
View file @
0603cfbb
...
...
@@ -76,21 +76,14 @@ class NotificationService
previous_assignee:
previous_assignees
)
<<<<<<<
HEAD
=======
previous_assignee_ids
=
previous_assignees
.
map
(
&
:id
)
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
recipients
.
each
do
|
recipient
|
mailer
.
send
(
:reassigned_issue_email
,
recipient
.
id
,
issue
.
id
,
<<<<<<<
HEAD
previous_assignees
.
map
(
&
:id
),
=======
previous_assignee_ids
,
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
current_user
.
id
).
deliver_later
end
...
...
app/services/slash_commands/interpret_service.rb
View file @
0603cfbb
...
...
@@ -100,7 +100,6 @@ module SlashCommands
end
parse_params
do
|
assignee_param
|
users
=
extract_references
(
assignee_param
,
:user
)
<<<<<<<
HEAD
if
users
.
empty?
users
=
User
.
where
(
username:
assignee_param
.
split
(
' '
).
map
(
&
:strip
))
...
...
@@ -111,18 +110,6 @@ module SlashCommands
command
:assign
do
|
users
|
next
if
users
.
empty?
=======
if
users
.
empty?
users
=
User
.
where
(
username:
assignee_param
.
split
(
' '
).
map
(
&
:strip
))
end
users
end
command
:assign
do
|
users
|
next
if
users
.
empty?
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
if
issuable
.
is_a?
(
Issue
)
@updates
[
:assignee_ids
]
=
users
.
map
(
&
:id
)
else
...
...
@@ -132,11 +119,7 @@ module SlashCommands
desc
'Remove assignee'
explanation
do
<<<<<<<
HEAD
"Removes assignee
#{
issuable
.
assignee
.
to_reference
}
."
=======
"Removes assignee
#{
issuable
.
assignees
.
first
.
to_reference
}
."
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
end
condition
do
issuable
.
persisted?
&&
...
...
@@ -516,21 +499,12 @@ module SlashCommands
def
find_label_ids
(
labels_param
)
find_labels
(
labels_param
).
map
(
&
:id
)
end
<<<<<<<
HEAD
def
explain_commands
(
commands
,
opts
)
commands
.
map
do
|
name
,
arg
|
definition
=
self
.
class
.
definition_by_name
(
name
)
next
unless
definition
=======
def
explain_commands
(
commands
,
opts
)
commands
.
map
do
|
name
,
arg
|
definition
=
self
.
class
.
definition_by_name
(
name
)
next
unless
definition
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
definition
.
explain
(
self
,
opts
,
arg
)
end
.
compact
end
...
...
app/services/system_note_service.rb
View file @
0603cfbb
...
...
@@ -84,11 +84,7 @@ module SystemNoteService
"assigned to
#{
issue
.
assignees
.
map
(
&
:to_reference
).
to_sentence
}
"
end
<<<<<<<
HEAD
create_note
(
noteable:
issue
,
project:
project
,
author:
author
,
note:
body
)
=======
create_note
(
NoteSummary
.
new
(
issue
,
project
,
author
,
body
,
action:
'assignee'
))
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
end
# Called when one or more labels on a Noteable are added and/or removed
...
...
app/views/issues/_issue.atom.builder
View file @
0603cfbb
...
...
@@ -26,11 +26,6 @@ xml.entry do
if issue.assignees.any?
xml.assignees do
issue.assignees.each do |assignee|
<<<<<<< HEAD
xml.name assignee.name
xml.email assignee.public_email
end
=======
xml.assignee do
xml.name assignee.name
xml.email assignee.public_email
...
...
@@ -41,7 +36,6 @@ xml.entry do
xml.assignee do
xml.name issue.assignees.first.name
xml.email issue.assignees.first.public_email
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
end
end
end
db/migrate/20170320171632_create_issue_assignees_table.rb
View file @
0603cfbb
...
...
@@ -26,11 +26,7 @@ class CreateIssueAssigneesTable < ActiveRecord::Migration
# disable_ddl_transaction!
def
up
<<<<<<<
HEAD
create_table
:issue_assignees
,
id:
false
do
|
t
|
=======
create_table
:issue_assignees
do
|
t
|
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
t
.
references
:user
,
foreign_key:
{
on_delete: :cascade
},
index:
true
,
null:
false
t
.
references
:issue
,
foreign_key:
{
on_delete: :cascade
},
null:
false
end
...
...
lib/api/issues.rb
View file @
0603cfbb
...
...
@@ -168,12 +168,8 @@ module API
optional
:state_event
,
type:
String
,
values:
%w[reopen close]
,
desc:
'State of the issue'
use
:issue_params
at_least_one_of
:title
,
:description
,
:assignee_ids
,
:assignee_id
,
:milestone_id
,
<<<<<<<
HEAD
:labels
,
:created_at
,
:due_date
,
:confidential
,
:state_event
,
:weight
=======
:labels
,
:created_at
,
:due_date
,
:confidential
,
:state_event
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
end
put
':id/issues/:issue_iid'
do
issue
=
user_project
.
issues
.
find_by!
(
iid:
params
.
delete
(
:issue_iid
))
...
...
lib/api/v3/issues.rb
View file @
0603cfbb
...
...
@@ -63,10 +63,6 @@ module API
end
get
do
issues
=
find_issues
(
scope:
'authored'
)
<<<<<<<
HEAD
=======
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
present
paginate
(
issues
),
with:
::
API
::
V3
::
Entities
::
Issue
,
current_user:
current_user
end
end
...
...
lib/gitlab/import_export/import_export.yml
View file @
0603cfbb
...
...
@@ -87,13 +87,10 @@ excluded_attributes:
-
:last_activity_at
-
:last_repository_updated_at
-
:last_repository_check_at
<<<<<<< HEAD
-
:mirror_last_update_at
-
:mirror_last_successful_update_at
-
:mirror_user_id
-
:mirror_trigger_builds
=======
>
>>>>>>
6ce1df41e175c7d62ca760b1e66cf1bf86150284
snippets
:
-
:expired_at
merge_request_diff
:
...
...
spec/features/atom/issues_spec.rb
View file @
0603cfbb
...
...
@@ -22,12 +22,8 @@ describe 'Issues Feed', feature: true do
to
have_content
(
'application/atom+xml'
)
expect
(
body
).
to
have_selector
(
'title'
,
text:
"
#{
project
.
name
}
issues"
)
expect
(
body
).
to
have_selector
(
'author email'
,
text:
issue
.
author_public_email
)
<<<<<<<
HEAD
expect
(
body
).
to
have_selector
(
'assignees email'
,
text:
issue
.
author_public_email
)
=======
expect
(
body
).
to
have_selector
(
'assignees assignee email'
,
text:
issue
.
assignees
.
first
.
public_email
)
expect
(
body
).
to
have_selector
(
'assignee email'
,
text:
issue
.
assignees
.
first
.
public_email
)
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
expect
(
body
).
to
have_selector
(
'entry summary'
,
text:
issue
.
title
)
end
end
...
...
@@ -41,12 +37,8 @@ describe 'Issues Feed', feature: true do
to
have_content
(
'application/atom+xml'
)
expect
(
body
).
to
have_selector
(
'title'
,
text:
"
#{
project
.
name
}
issues"
)
expect
(
body
).
to
have_selector
(
'author email'
,
text:
issue
.
author_public_email
)
<<<<<<<
HEAD
expect
(
body
).
to
have_selector
(
'assignees email'
,
text:
issue
.
author_public_email
)
=======
expect
(
body
).
to
have_selector
(
'assignees assignee email'
,
text:
issue
.
assignees
.
first
.
public_email
)
expect
(
body
).
to
have_selector
(
'assignee email'
,
text:
issue
.
assignees
.
first
.
public_email
)
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
expect
(
body
).
to
have_selector
(
'entry summary'
,
text:
issue
.
title
)
end
end
...
...
spec/features/dashboard/issuables_counter_spec.rb
View file @
0603cfbb
...
...
@@ -18,11 +18,8 @@ describe 'Navigation bar counter', feature: true, caching: true do
expect_counters
(
'issues'
,
'1'
)
issue
.
assignees
=
[]
<<<<<<<
HEAD
=======
user
.
update_cache_counts
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
Timecop
.
travel
(
3
.
minutes
.
from_now
)
do
visit
issues_path
...
...
spec/features/issues_spec.rb
View file @
0603cfbb
...
...
@@ -507,7 +507,6 @@ describe 'Issues', feature: true do
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
expect
(
page
).
to
have_content
issue
.
assignees
.
first
.
name
<<<<<<<
HEAD
end
end
end
...
...
@@ -529,8 +528,6 @@ describe 'Issues', feature: true do
page
.
within
(
'.value'
)
do
expect
(
page
).
to
have_content
"1"
end
=======
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
end
end
end
...
...
spec/finders/issues_finder_spec.rb
View file @
0603cfbb
require
'spec_helper'
describe
IssuesFinder
do
<<<<<<<
HEAD
let
(
:user
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:project1
)
{
create
(
:empty_project
)
}
let
(
:project2
)
{
create
(
:empty_project
)
}
let
(
:milestone
)
{
create
(
:milestone
,
project:
project1
)
}
let
(
:label
)
{
create
(
:label
,
project:
project2
)
}
let
(
:issue1
)
{
create
(
:issue
,
author:
user
,
assignees:
[
user
],
project:
project1
,
milestone:
milestone
,
title:
'gitlab'
)
}
let
(
:issue2
)
{
create
(
:issue
,
author:
user
,
assignees:
[
user
],
project:
project2
,
description:
'gitlab'
)
}
let
(
:issue3
)
{
create
(
:issue
,
author:
user2
,
assignees:
[
user2
],
project:
project2
,
title:
'tanuki'
,
description:
'tanuki'
)
}
describe
'#execute'
do
let
(
:closed_issue
)
{
create
(
:issue
,
author:
user2
,
assignees:
[
user2
],
project:
project2
,
state:
'closed'
)
}
let!
(
:label_link
)
{
create
(
:label_link
,
label:
label
,
target:
issue2
)
}
=======
set
(
:user
)
{
create
(
:user
)
}
set
(
:user2
)
{
create
(
:user
)
}
set
(
:project1
)
{
create
(
:empty_project
)
}
...
...
@@ -29,7 +14,6 @@ describe IssuesFinder do
describe
'#execute'
do
set
(
:closed_issue
)
{
create
(
:issue
,
author:
user2
,
assignees:
[
user2
],
project:
project2
,
state:
'closed'
)
}
set
(
:label_link
)
{
create
(
:label_link
,
label:
label
,
target:
issue2
)
}
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
let
(
:search_user
)
{
user
}
let
(
:params
)
{
{}
}
let
(
:issues
)
{
described_class
.
new
(
search_user
,
params
.
reverse_merge
(
scope:
scope
,
state:
'opened'
)).
execute
}
...
...
spec/models/group_spec.rb
View file @
0603cfbb
...
...
@@ -188,7 +188,6 @@ describe Group, models: true do
let
(
:avatar_path
)
{
"/uploads/group/avatar/
#{
group
.
id
}
/dk.png"
}
it
{
should
eq
"http://
#{
Gitlab
.
config
.
gitlab
.
host
}#{
avatar_path
}
"
}
<<<<<<<
HEAD
context
'when in a geo secondary node'
do
let
(
:geo_url
)
{
'http://geo.example.com'
}
...
...
@@ -200,8 +199,6 @@ describe Group, models: true do
it
{
should
eq
"
#{
geo_url
}#{
avatar_path
}
"
}
end
=======
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
end
end
...
...
spec/models/project_spec.rb
View file @
0603cfbb
...
...
@@ -971,7 +971,6 @@ describe Project, models: true do
context
'when avatar file is uploaded'
do
let
(
:project
)
{
create
(
:empty_project
,
:with_avatar
)
}
let
(
:avatar_path
)
{
"/uploads/project/avatar/
#{
project
.
id
}
/dk.png"
}
<<<<<<<
HEAD
it
{
should
eq
"http://
#{
Gitlab
.
config
.
gitlab
.
host
}#{
avatar_path
}
"
}
...
...
@@ -985,10 +984,6 @@ describe Project, models: true do
it
{
should
eq
"
#{
geo_url
}#{
avatar_path
}
"
}
end
=======
it
{
should
eq
"http://
#{
Gitlab
.
config
.
gitlab
.
host
}#{
avatar_path
}
"
}
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
end
context
'When avatar file in git'
do
...
...
spec/models/user_spec.rb
View file @
0603cfbb
...
...
@@ -906,7 +906,6 @@ describe User, models: true do
let
(
:avatar_path
)
{
"/uploads/user/avatar/
#{
user
.
id
}
/dk.png"
}
it
{
should
eq
"http://
#{
Gitlab
.
config
.
gitlab
.
host
}#{
avatar_path
}
"
}
<<<<<<<
HEAD
context
'when in a geo secondary node'
do
let
(
:geo_url
)
{
'http://geo.example.com'
}
...
...
@@ -918,8 +917,6 @@ describe User, models: true do
it
{
should
eq
"
#{
geo_url
}#{
avatar_path
}
"
}
end
=======
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
end
end
...
...
spec/requests/api/issues_spec.rb
View file @
0603cfbb
...
...
@@ -773,20 +773,6 @@ describe API::Issues do
end
end
<<<<<<<
HEAD
=======
context
'CE restrictions'
do
it
'creates a new project issue with no more than one assignee'
do
post
api
(
"/projects/
#{
project
.
id
}
/issues"
,
user
),
title:
'new issue'
,
assignee_ids:
[
user2
.
id
,
guest
.
id
]
expect
(
response
).
to
have_http_status
(
201
)
expect
(
json_response
[
'title'
]).
to
eq
(
'new issue'
)
expect
(
json_response
[
'assignees'
].
count
).
to
eq
(
1
)
end
end
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
it
'creates a new project issue'
do
post
api
(
"/projects/
#{
project
.
id
}
/issues"
,
user
),
title:
'new issue'
,
labels:
'label, label2'
,
weight:
3
,
...
...
@@ -797,10 +783,7 @@ describe API::Issues do
expect
(
json_response
[
'description'
]).
to
be_nil
expect
(
json_response
[
'labels'
]).
to
eq
(
%w(label label2)
)
expect
(
json_response
[
'confidential'
]).
to
be_falsy
<<<<<<<
HEAD
expect
(
json_response
[
'weight'
]).
to
eq
(
3
)
=======
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
expect
(
json_response
[
'assignee'
][
'name'
]).
to
eq
(
user2
.
name
)
expect
(
json_response
[
'assignees'
].
first
[
'name'
]).
to
eq
(
user2
.
name
)
end
...
...
@@ -1130,20 +1113,6 @@ describe API::Issues do
expect
(
json_response
[
'assignees'
].
first
[
'name'
]).
to
eq
(
user2
.
name
)
end
<<<<<<<
HEAD
=======
context
'CE restrictions'
do
it
'updates an issue with several assignee but only one has been applied'
do
put
api
(
"/projects/
#{
project
.
id
}
/issues/
#{
issue
.
iid
}
"
,
user
),
assignee_ids:
[
user2
.
id
,
guest
.
id
]
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
[
'assignees'
].
size
).
to
eq
(
1
)
end
end
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
end
describe
'PUT /projects/:id/issues/:issue_iid to update labels'
do
...
...
spec/requests/api/v3/issues_spec.rb
View file @
0603cfbb
...
...
@@ -738,21 +738,14 @@ describe API::V3::Issues do
describe
"POST /projects/:id/issues"
do
it
'creates a new project issue'
do
post
v3_api
(
"/projects/
#{
project
.
id
}
/issues"
,
user
),
<<<<<<<
HEAD
title:
'new issue'
,
labels:
'label, label2'
,
weight:
3
,
assignee_id:
assignee
.
id
=======
title:
'new issue'
,
labels:
'label, label2'
,
assignee_id:
assignee
.
id
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
expect
(
response
).
to
have_http_status
(
201
)
expect
(
json_response
[
'title'
]).
to
eq
(
'new issue'
)
expect
(
json_response
[
'description'
]).
to
be_nil
expect
(
json_response
[
'labels'
]).
to
eq
(
%w(label label2)
)
expect
(
json_response
[
'confidential'
]).
to
be_falsy
<<<<<<<
HEAD
expect
(
json_response
[
'weight'
]).
to
eq
(
3
)
=======
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
expect
(
json_response
[
'assignee'
][
'name'
]).
to
eq
(
assignee
.
name
)
end
...
...
@@ -1166,7 +1159,6 @@ describe API::V3::Issues do
end
end
<<<<<<<
HEAD
describe
'PUT /projects/:id/issues/:issue_id to update weight'
do
it
'updates an issue with no weight'
do
put
v3_api
(
"/projects/
#{
project
.
id
}
/issues/
#{
issue
.
id
}
"
,
user
),
weight:
5
...
...
@@ -1199,8 +1191,6 @@ describe API::V3::Issues do
end
end
=======
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
describe
"DELETE /projects/:id/issues/:issue_id"
do
it
"rejects a non member from deleting an issue"
do
delete
v3_api
(
"/projects/
#{
project
.
id
}
/issues/
#{
issue
.
id
}
"
,
non_member
)
...
...
spec/services/issues/update_service_spec.rb
View file @
0603cfbb
...
...
@@ -40,11 +40,7 @@ describe Issues::UpdateService, services: true do
{
title:
'New title'
,
description:
'Also please fix'
,
<<<<<<<
HEAD
assignee_ids:
[
user2
.
id
,
user3
.
id
],
=======
assignee_ids:
[
user2
.
id
],
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
state_event:
'close'
,
label_ids:
[
label
.
id
],
due_date:
Date
.
tomorrow
...
...
@@ -57,11 +53,7 @@ describe Issues::UpdateService, services: true do
expect
(
issue
).
to
be_valid
expect
(
issue
.
title
).
to
eq
'New title'
expect
(
issue
.
description
).
to
eq
'Also please fix'
<<<<<<<
HEAD
expect
(
issue
.
assignees
).
to
match_array
([
user2
,
user3
])
=======
expect
(
issue
.
assignees
).
to
match_array
([
user2
])
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
expect
(
issue
).
to
be_closed
expect
(
issue
.
labels
).
to
match_array
[
label
]
expect
(
issue
.
due_date
).
to
eq
Date
.
tomorrow
...
...
spec/services/slash_commands/interpret_service_spec.rb
View file @
0603cfbb
...
...
@@ -901,11 +901,7 @@ describe SlashCommands::InterpretService, services: true do
describe
'unassign command'
do
let
(
:content
)
{
'/unassign'
}
<<<<<<<
HEAD
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
assignee:
developer
)
}
=======
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
assignees:
[
developer
])
}
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
it
'includes current assignee reference'
do
_
,
explanations
=
service
.
explain
(
content
,
issue
)
...
...
@@ -1063,7 +1059,6 @@ describe SlashCommands::InterpretService, services: true do
expect
(
explanations
).
to
eq
([
"Moves issue to ~
#{
bug
.
id
}
column in the board."
])
end
end
<<<<<<<
HEAD
# EE-specific tests
...
...
@@ -1075,7 +1070,5 @@ describe SlashCommands::InterpretService, services: true do
expect
(
explanations
).
to
eq
([
'Sets weight to 4.'
])
end
end
=======
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
end
end
spec/services/system_note_service_spec.rb
View file @
0603cfbb
...
...
@@ -164,13 +164,9 @@ describe SystemNoteService, services: true do
let
(
:assignee2
)
{
create
(
:user
)
}
let
(
:assignee3
)
{
create
(
:user
)
}
<<<<<<<
HEAD
it_behaves_like
'a system note'
=======
it_behaves_like
'a system note'
do
let
(
:action
)
{
'assignee'
}
end
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
def
build_note
(
old_assignees
,
new_assignees
)
issue
.
assignees
=
new_assignees
...
...
spec/workers/post_receive_spec.rb
View file @
0603cfbb
...
...
@@ -97,7 +97,6 @@ describe PostReceive do
it
"fetches the correct project"
do
expect
(
Project
).
to
receive
(
:find_by
).
with
(
id:
project
.
id
.
to_s
)
described_class
.
new
.
perform
(
project_identifier
,
key_id
,
base64_changes
)
<<<<<<<
HEAD
end
it
"triggers wiki index update"
do
...
...
@@ -109,8 +108,6 @@ describe PostReceive do
repo_path
=
"
#{
pwd
(
project
)
}
.wiki"
described_class
.
new
.
perform
(
repo_path
,
key_id
,
base64_changes
)
=======
>>>>>>>
6
ce1df41e175c7d62ca760b1e66cf1bf86150284
end
it
"does not run if the author is not in the project"
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