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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
9fe4c279
Commit
9fe4c279
authored
Jul 30, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 1499-api-endpoint-for-configuring-pull-mirroring-via-http-ce
parents
d138a949
94ea835e
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
62 additions
and
67 deletions
+62
-67
CHANGELOG.md
CHANGELOG.md
+18
-0
app/assets/javascripts/pipelines/components/graph/dropdown_job_component.vue
...pts/pipelines/components/graph/dropdown_job_component.vue
+1
-1
app/assets/javascripts/pipelines/components/graph/job_component.vue
.../javascripts/pipelines/components/graph/job_component.vue
+1
-1
app/models/user.rb
app/models/user.rb
+7
-3
app/views/projects/jobs/_sidebar.html.haml
app/views/projects/jobs/_sidebar.html.haml
+1
-1
changelogs/unreleased/4525-fix-project-indexes.yml
changelogs/unreleased/4525-fix-project-indexes.yml
+0
-5
changelogs/unreleased/47728-mr-api-documentation-changes.yml
changelogs/unreleased/47728-mr-api-documentation-changes.yml
+5
-0
changelogs/unreleased/48817-fix-mr-changes-discussion-navigation.yml
...unreleased/48817-fix-mr-changes-discussion-navigation.yml
+0
-5
changelogs/unreleased/_acet-fix-expanding-context-lines.yml
changelogs/unreleased/_acet-fix-expanding-context-lines.yml
+0
-5
changelogs/unreleased/_acet-fix-mr-autosave.yml
changelogs/unreleased/_acet-fix-mr-autosave.yml
+0
-5
changelogs/unreleased/_acet-fix-outdated-discussions.yml
changelogs/unreleased/_acet-fix-outdated-discussions.yml
+0
-5
changelogs/unreleased/ide-edit-json-files.yml
changelogs/unreleased/ide-edit-json-files.yml
+0
-5
changelogs/unreleased/project-dropdown-list-overflow.yml
changelogs/unreleased/project-dropdown-list-overflow.yml
+0
-5
changelogs/unreleased/sh-support-users-find-by-confirmed-emails.yml
.../unreleased/sh-support-users-find-by-confirmed-emails.yml
+5
-0
changelogs/unreleased/tz-mr-refactor-memory-reduction.yml
changelogs/unreleased/tz-mr-refactor-memory-reduction.yml
+0
-5
changelogs/unreleased/zj-backup-timeout.yml
changelogs/unreleased/zj-backup-timeout.yml
+0
-5
doc/api/merge_requests.md
doc/api/merge_requests.md
+5
-12
spec/javascripts/pipelines/graph/dropdown_job_component_spec.js
...avascripts/pipelines/graph/dropdown_job_component_spec.js
+3
-3
spec/javascripts/pipelines/graph/job_component_spec.js
spec/javascripts/pipelines/graph/job_component_spec.js
+1
-1
spec/models/user_spec.rb
spec/models/user_spec.rb
+15
-0
No files found.
CHANGELOG.md
View file @
9fe4c279
...
@@ -2,6 +2,24 @@
...
@@ -2,6 +2,24 @@
documentation
](
doc/development/changelog.md
)
for instructions on adding your own
documentation
](
doc/development/changelog.md
)
for instructions on adding your own
entry.
entry.
## 11.1.3 (2018-07-27)
### Fixed (8 changes, 1 of them is from the community)
-
Rework some projects table indexes around repository_storage field. !20377
-
Fix navigation to First and Next discussion on MR Changes tab. !20434
-
Fix showing outdated discussions on Changes tab. !20445
-
Fix autosave and ESC confirmation issues for MR discussions. !20569
-
Fix rendering of the context lines in MR diffs page. !20642
-
Don't overflow project/group dropdown results. !20704 (gfyoung)
-
Fixed IDE not opening JSON files. !20798
-
Disable Gitaly timeouts when creating or restoring backups. !20810
### Performance (1 change)
-
Reduces the client side memory footprint on merge requests. !20744
## 11.1.2 (2018-07-26)
## 11.1.2 (2018-07-26)
### Security (4 changes)
### Security (4 changes)
...
...
app/assets/javascripts/pipelines/components/graph/dropdown_job_component.vue
View file @
9fe4c279
...
@@ -14,7 +14,7 @@ import tooltip from '../../../vue_shared/directives/tooltip';
...
@@ -14,7 +14,7 @@ import tooltip from '../../../vue_shared/directives/tooltip';
* "id": 4256,
* "id": 4256,
* "name": "test",
* "name": "test",
* "status": {
* "status": {
* "icon": "
icon_
status_success",
* "icon": "status_success",
* "text": "passed",
* "text": "passed",
* "label": "passed",
* "label": "passed",
* "group": "success",
* "group": "success",
...
...
app/assets/javascripts/pipelines/components/graph/job_component.vue
View file @
9fe4c279
...
@@ -13,7 +13,7 @@ import tooltip from '../../../vue_shared/directives/tooltip';
...
@@ -13,7 +13,7 @@ import tooltip from '../../../vue_shared/directives/tooltip';
* "id": 4256,
* "id": 4256,
* "name": "test",
* "name": "test",
* "status": {
* "status": {
* "icon": "
icon_
status_success",
* "icon": "status_success",
* "text": "passed",
* "text": "passed",
* "label": "passed",
* "label": "passed",
* "group": "success",
* "group": "success",
...
...
app/models/user.rb
View file @
9fe4c279
...
@@ -248,6 +248,7 @@ class User < ActiveRecord::Base
...
@@ -248,6 +248,7 @@ class User < ActiveRecord::Base
scope
:todo_authors
,
->
(
user_id
,
state
)
{
where
(
id:
Todo
.
where
(
user_id:
user_id
,
state:
state
).
select
(
:author_id
))
}
scope
:todo_authors
,
->
(
user_id
,
state
)
{
where
(
id:
Todo
.
where
(
user_id:
user_id
,
state:
state
).
select
(
:author_id
))
}
scope
:order_recent_sign_in
,
->
{
reorder
(
Gitlab
::
Database
.
nulls_last_order
(
'current_sign_in_at'
,
'DESC'
))
}
scope
:order_recent_sign_in
,
->
{
reorder
(
Gitlab
::
Database
.
nulls_last_order
(
'current_sign_in_at'
,
'DESC'
))
}
scope
:order_oldest_sign_in
,
->
{
reorder
(
Gitlab
::
Database
.
nulls_last_order
(
'current_sign_in_at'
,
'ASC'
))
}
scope
:order_oldest_sign_in
,
->
{
reorder
(
Gitlab
::
Database
.
nulls_last_order
(
'current_sign_in_at'
,
'ASC'
))
}
scope
:confirmed
,
->
{
where
.
not
(
confirmed_at:
nil
)
}
def
self
.
with_two_factor_indistinct
def
self
.
with_two_factor_indistinct
joins
(
"LEFT OUTER JOIN u2f_registrations AS u2f ON u2f.user_id = users.id"
)
joins
(
"LEFT OUTER JOIN u2f_registrations AS u2f ON u2f.user_id = users.id"
)
...
@@ -293,14 +294,17 @@ class User < ActiveRecord::Base
...
@@ -293,14 +294,17 @@ class User < ActiveRecord::Base
end
end
# Find a User by their primary email or any associated secondary email
# Find a User by their primary email or any associated secondary email
def
find_by_any_email
(
email
)
def
find_by_any_email
(
email
,
confirmed:
false
)
by_any_email
(
email
).
take
by_any_email
(
email
,
confirmed:
confirmed
).
take
end
end
# Returns a relation containing all the users for the given Email address
# Returns a relation containing all the users for the given Email address
def
by_any_email
(
email
)
def
by_any_email
(
email
,
confirmed:
false
)
users
=
where
(
email:
email
)
users
=
where
(
email:
email
)
users
=
users
.
confirmed
if
confirmed
emails
=
joins
(
:emails
).
where
(
emails:
{
email:
email
})
emails
=
joins
(
:emails
).
where
(
emails:
{
email:
email
})
emails
=
emails
.
confirmed
if
confirmed
union
=
Gitlab
::
SQL
::
Union
.
new
([
users
,
emails
])
union
=
Gitlab
::
SQL
::
Union
.
new
([
users
,
emails
])
from
(
"(
#{
union
.
to_sql
}
)
#{
table_name
}
"
)
from
(
"(
#{
union
.
to_sql
}
)
#{
table_name
}
"
)
...
...
app/views/projects/jobs/_sidebar.html.haml
View file @
9fe4c279
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
-
HasStatus
::
ORDERED_STATUSES
.
each
do
|
build_status
|
-
HasStatus
::
ORDERED_STATUSES
.
each
do
|
build_status
|
-
builds
.
select
{
|
build
|
build
.
status
==
build_status
}.
each
do
|
build
|
-
builds
.
select
{
|
build
|
build
.
status
==
build_status
}.
each
do
|
build
|
.build-job
{
class:
sidebar_build_class
(
build
,
@build
),
data:
{
stage:
build
.
stage
}
}
.build-job
{
class:
sidebar_build_class
(
build
,
@build
),
data:
{
stage:
build
.
stage
}
}
-
tooltip
=
sanitize
(
build
.
tooltip_message
)
-
tooltip
=
sanitize
(
build
.
tooltip_message
.
dup
)
=
link_to
(
project_job_path
(
@project
,
build
),
data:
{
toggle:
'tooltip'
,
html:
'true'
,
title:
tooltip
,
container:
'body'
})
do
=
link_to
(
project_job_path
(
@project
,
build
),
data:
{
toggle:
'tooltip'
,
html:
'true'
,
title:
tooltip
,
container:
'body'
})
do
=
sprite_icon
(
'arrow-right'
,
size
:
16
,
css_class:
'icon-arrow-right'
)
=
sprite_icon
(
'arrow-right'
,
size
:
16
,
css_class:
'icon-arrow-right'
)
%span
{
class:
"ci-status-icon-#{build.status}"
}
%span
{
class:
"ci-status-icon-#{build.status}"
}
...
...
changelogs/unreleased/4525-fix-project-indexes.yml
deleted
100644 → 0
View file @
d138a949
---
title
:
Rework some projects table indexes around repository_storage field
merge_request
:
20377
author
:
type
:
fixed
changelogs/unreleased/47728-mr-api-documentation-changes.yml
0 → 100644
View file @
9fe4c279
---
title
:
Remove changes_count from MR API documentation where necessary
merge_request
:
19745
author
:
Jan Beckmann
type
:
fixed
changelogs/unreleased/48817-fix-mr-changes-discussion-navigation.yml
deleted
100644 → 0
View file @
d138a949
---
title
:
Fix navigation to First and Next discussion on MR Changes tab
merge_request
:
20434
author
:
type
:
fixed
changelogs/unreleased/_acet-fix-expanding-context-lines.yml
deleted
100644 → 0
View file @
d138a949
---
title
:
Fix rendering of the context lines in MR diffs page
merge_request
:
20642
author
:
type
:
fixed
changelogs/unreleased/_acet-fix-mr-autosave.yml
deleted
100644 → 0
View file @
d138a949
---
title
:
Fix autosave and ESC confirmation issues for MR discussions
merge_request
:
20569
author
:
type
:
fixed
changelogs/unreleased/_acet-fix-outdated-discussions.yml
deleted
100644 → 0
View file @
d138a949
---
title
:
Fix showing outdated discussions on Changes tab
merge_request
:
20445
author
:
type
:
fixed
changelogs/unreleased/ide-edit-json-files.yml
deleted
100644 → 0
View file @
d138a949
---
title
:
Fixed IDE not opening JSON files
merge_request
:
20798
author
:
type
:
fixed
changelogs/unreleased/project-dropdown-list-overflow.yml
deleted
100644 → 0
View file @
d138a949
---
title
:
Don't overflow project/group dropdown results
merge_request
:
20704
author
:
gfyoung
type
:
fixed
changelogs/unreleased/sh-support-users-find-by-confirmed-emails.yml
0 → 100644
View file @
9fe4c279
---
title
:
Add support for searching users by confirmed e-mails
merge_request
:
20893
author
:
type
:
other
changelogs/unreleased/tz-mr-refactor-memory-reduction.yml
deleted
100644 → 0
View file @
d138a949
---
title
:
Reduces the client side memory footprint on merge requests
merge_request
:
20744
author
:
type
:
performance
changelogs/unreleased/zj-backup-timeout.yml
deleted
100644 → 0
View file @
d138a949
---
title
:
Disable Gitaly timeouts when creating or restoring backups
merge_request
:
20810
author
:
type
:
fixed
doc/api/merge_requests.md
View file @
9fe4c279
...
@@ -15,11 +15,6 @@ given state (`opened`, `closed`, `locked`, or `merged`) or all of them (`all`).
...
@@ -15,11 +15,6 @@ given state (`opened`, `closed`, `locked`, or `merged`) or all of them (`all`).
The pagination parameters
`page`
and
`per_page`
can be used to
The pagination parameters
`page`
and
`per_page`
can be used to
restrict the list of merge requests.
restrict the list of merge requests.
**Note**
: the
`changes_count`
value in the response is a string, not an
integer. This is because when an MR has too many changes to display and store,
it will be capped at 1,000. In that case, the API will return the string
`"1000+"`
for the changes count.
```
```
GET /merge_requests
GET /merge_requests
GET /merge_requests?state=opened
GET /merge_requests?state=opened
...
@@ -104,7 +99,6 @@ Parameters:
...
@@ -104,7 +99,6 @@ Parameters:
"sha"
:
"8888888888888888888888888888888888888888"
,
"sha"
:
"8888888888888888888888888888888888888888"
,
"merge_commit_sha"
:
null
,
"merge_commit_sha"
:
null
,
"user_notes_count"
:
1
,
"user_notes_count"
:
1
,
"changes_count"
:
"1"
,
"should_remove_source_branch"
:
true
,
"should_remove_source_branch"
:
true
,
"force_remove_source_branch"
:
false
,
"force_remove_source_branch"
:
false
,
"squash"
:
false
,
"squash"
:
false
,
...
@@ -144,10 +138,6 @@ will be the same. In the case of a merge request from a fork,
...
@@ -144,10 +138,6 @@ will be the same. In the case of a merge request from a fork,
`target_project_id`
and
`project_id`
will be the same and
`target_project_id`
and
`project_id`
will be the same and
`source_project_id`
will be the fork project's ID.
`source_project_id`
will be the fork project's ID.
**Note**
: the
`changes_count`
value in the response is a string, not an
integer. This is because when an MR has too many changes to display and store,
it will be capped at 1,000. In that case, the API will return the string
`"1000+"`
for the changes count.
Parameters:
Parameters:
...
@@ -224,7 +214,6 @@ Parameters:
...
@@ -224,7 +214,6 @@ Parameters:
"sha"
:
"8888888888888888888888888888888888888888"
,
"sha"
:
"8888888888888888888888888888888888888888"
,
"merge_commit_sha"
:
null
,
"merge_commit_sha"
:
null
,
"user_notes_count"
:
1
,
"user_notes_count"
:
1
,
"changes_count"
:
"1"
,
"should_remove_source_branch"
:
true
,
"should_remove_source_branch"
:
true
,
"force_remove_source_branch"
:
false
,
"force_remove_source_branch"
:
false
,
"squash"
:
false
,
"squash"
:
false
,
...
@@ -331,7 +320,6 @@ Parameters:
...
@@ -331,7 +320,6 @@ Parameters:
"sha"
:
"8888888888888888888888888888888888888888"
,
"sha"
:
"8888888888888888888888888888888888888888"
,
"merge_commit_sha"
:
null
,
"merge_commit_sha"
:
null
,
"user_notes_count"
:
1
,
"user_notes_count"
:
1
,
"changes_count"
:
"1"
,
"should_remove_source_branch"
:
true
,
"should_remove_source_branch"
:
true
,
"force_remove_source_branch"
:
false
,
"force_remove_source_branch"
:
false
,
"web_url"
:
"http://example.com/example/example/merge_requests/1"
,
"web_url"
:
"http://example.com/example/example/merge_requests/1"
,
...
@@ -350,6 +338,11 @@ Parameters:
...
@@ -350,6 +338,11 @@ Parameters:
Shows information about a single merge request.
Shows information about a single merge request.
**Note**
: the
`changes_count`
value in the response is a string, not an
integer. This is because when an MR has too many changes to display and store,
it will be capped at 1,000. In that case, the API will return the string
`"1000+"`
for the changes count.
```
```
GET /projects/:id/merge_requests/:merge_request_iid
GET /projects/:id/merge_requests/:merge_request_iid
```
```
...
...
spec/javascripts/pipelines/graph/dropdown_job_component_spec.js
View file @
9fe4c279
...
@@ -12,7 +12,7 @@ describe('dropdown job component', () => {
...
@@ -12,7 +12,7 @@ describe('dropdown job component', () => {
id
:
4256
,
id
:
4256
,
name
:
'
<img src=x onerror=alert(document.domain)>
'
,
name
:
'
<img src=x onerror=alert(document.domain)>
'
,
status
:
{
status
:
{
icon
:
'
icon_
status_success
'
,
icon
:
'
status_success
'
,
text
:
'
passed
'
,
text
:
'
passed
'
,
label
:
'
passed
'
,
label
:
'
passed
'
,
tooltip
:
'
passed
'
,
tooltip
:
'
passed
'
,
...
@@ -31,7 +31,7 @@ describe('dropdown job component', () => {
...
@@ -31,7 +31,7 @@ describe('dropdown job component', () => {
id
:
4299
,
id
:
4299
,
name
:
'
test
'
,
name
:
'
test
'
,
status
:
{
status
:
{
icon
:
'
icon_
status_success
'
,
icon
:
'
status_success
'
,
text
:
'
passed
'
,
text
:
'
passed
'
,
label
:
'
passed
'
,
label
:
'
passed
'
,
tooltip
:
'
passed
'
,
tooltip
:
'
passed
'
,
...
@@ -50,7 +50,7 @@ describe('dropdown job component', () => {
...
@@ -50,7 +50,7 @@ describe('dropdown job component', () => {
name
:
'
rspec:linux
'
,
name
:
'
rspec:linux
'
,
size
:
2
,
size
:
2
,
status
:
{
status
:
{
icon
:
'
icon_
status_success
'
,
icon
:
'
status_success
'
,
text
:
'
passed
'
,
text
:
'
passed
'
,
label
:
'
passed
'
,
label
:
'
passed
'
,
tooltip
:
'
passed
'
,
tooltip
:
'
passed
'
,
...
...
spec/javascripts/pipelines/graph/job_component_spec.js
View file @
9fe4c279
...
@@ -169,7 +169,7 @@ describe('pipeline graph job component', () => {
...
@@ -169,7 +169,7 @@ describe('pipeline graph job component', () => {
id
:
4259
,
id
:
4259
,
name
:
'
<img src=x onerror=alert(document.domain)>
'
,
name
:
'
<img src=x onerror=alert(document.domain)>
'
,
status
:
{
status
:
{
icon
:
'
icon_
status_success
'
,
icon
:
'
status_success
'
,
label
:
'
success
'
,
label
:
'
success
'
,
tooltip
:
'
failed
'
,
tooltip
:
'
failed
'
,
},
},
...
...
spec/models/user_spec.rb
View file @
9fe4c279
...
@@ -949,6 +949,7 @@ describe User do
...
@@ -949,6 +949,7 @@ describe User do
user
=
create
(
:user
,
email:
'foo@example.com'
)
user
=
create
(
:user
,
email:
'foo@example.com'
)
expect
(
described_class
.
find_by_any_email
(
user
.
email
)).
to
eq
user
expect
(
described_class
.
find_by_any_email
(
user
.
email
)).
to
eq
user
expect
(
described_class
.
find_by_any_email
(
user
.
email
,
confirmed:
true
)).
to
eq
user
end
end
it
'finds by secondary email'
do
it
'finds by secondary email'
do
...
@@ -956,11 +957,19 @@ describe User do
...
@@ -956,11 +957,19 @@ describe User do
user
=
email
.
user
user
=
email
.
user
expect
(
described_class
.
find_by_any_email
(
email
.
email
)).
to
eq
user
expect
(
described_class
.
find_by_any_email
(
email
.
email
)).
to
eq
user
expect
(
described_class
.
find_by_any_email
(
email
.
email
,
confirmed:
true
)).
to
eq
user
end
end
it
'returns nil when nothing found'
do
it
'returns nil when nothing found'
do
expect
(
described_class
.
find_by_any_email
(
''
)).
to
be_nil
expect
(
described_class
.
find_by_any_email
(
''
)).
to
be_nil
end
end
it
'returns nil when user is not confirmed'
do
user
=
create
(
:user
,
email:
'foo@example.com'
,
confirmed_at:
nil
)
expect
(
described_class
.
find_by_any_email
(
user
.
email
,
confirmed:
false
)).
to
eq
(
user
)
expect
(
described_class
.
find_by_any_email
(
user
.
email
,
confirmed:
true
)).
to
be_nil
end
end
end
describe
'.by_any_email'
do
describe
'.by_any_email'
do
...
@@ -974,6 +983,12 @@ describe User do
...
@@ -974,6 +983,12 @@ describe User do
expect
(
described_class
.
by_any_email
(
user
.
email
)).
to
eq
([
user
])
expect
(
described_class
.
by_any_email
(
user
.
email
)).
to
eq
([
user
])
end
end
it
'returns a relation of users for confirmed users'
do
user
=
create
(
:user
)
expect
(
described_class
.
by_any_email
(
user
.
email
,
confirmed:
true
)).
to
eq
([
user
])
end
end
end
describe
'.search'
do
describe
'.search'
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