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
Léo-Paul Géneau
gitlab-ce
Commits
dad534d9
Commit
dad534d9
authored
Dec 18, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
2a65a97e
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
588 additions
and
598 deletions
+588
-598
app/assets/javascripts/jobs/components/log/log.vue
app/assets/javascripts/jobs/components/log/log.vue
+1
-1
app/assets/javascripts/users_select.js
app/assets/javascripts/users_select.js
+563
-576
changelogs/unreleased/34625-Remove-IIFEs-from-users_select-js.yml
...gs/unreleased/34625-Remove-IIFEs-from-users_select-js.yml
+5
-0
doc/ci/multi_project_pipelines.md
doc/ci/multi_project_pipelines.md
+1
-0
qa/qa/page/project/job/show.rb
qa/qa/page/project/job/show.rb
+4
-4
qa/qa/resource/merge_request.rb
qa/qa/resource/merge_request.rb
+1
-1
qa/qa/resource/merge_request_from_fork.rb
qa/qa/resource/merge_request_from_fork.rb
+3
-1
qa/qa/resource/protected_branch.rb
qa/qa/resource/protected_branch.rb
+3
-1
qa/qa/resource/repository/project_push.rb
qa/qa/resource/repository/project_push.rb
+3
-1
qa/qa/resource/repository/push.rb
qa/qa/resource/repository/push.rb
+2
-1
qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb
...reate/merge_request/view_merge_request_diff_patch_spec.rb
+2
-7
qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb
...er_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb
+0
-5
No files found.
app/assets/javascripts/jobs/components/log/log.vue
View file @
dad534d9
...
...
@@ -49,7 +49,7 @@ export default {
};
</
script
>
<
template
>
<code
class=
"job-log d-block"
>
<code
class=
"job-log d-block"
data-qa-selector=
"job_log_content"
>
<template
v-for=
"(section, index) in trace"
>
<collpasible-log-section
v-if=
"section.isHeader"
...
...
app/assets/javascripts/users_select.js
View file @
dad534d9
...
...
@@ -27,10 +27,10 @@ function UsersSelect(currentUser, els, options = {}) {
}
const
{
handleClick
}
=
options
;
const
userSelect
=
this
;
$els
.
each
(
(
function
(
_this
)
{
return
function
(
i
,
dropdown
)
{
$els
.
each
((
i
,
dropdown
)
=>
{
const
userSelect
=
this
;
const
options
=
{};
const
$dropdown
=
$
(
dropdown
);
options
.
projectId
=
$dropdown
.
data
(
'
projectId
'
);
...
...
@@ -75,7 +75,7 @@ function UsersSelect(currentUser, els, options = {}) {
// Save current selected user to the DOM
const
currentUserInfo
=
$dropdown
.
data
(
'
currentUserInfo
'
)
||
{};
const
currentUser
=
_this
.
currentUser
||
{};
const
currentUser
=
userSelect
.
currentUser
||
{};
const
fieldName
=
$dropdown
.
data
(
'
fieldName
'
);
const
userName
=
currentUserInfo
.
name
;
const
userId
=
currentUserInfo
.
id
||
currentUser
.
id
;
...
...
@@ -181,7 +181,7 @@ function UsersSelect(currentUser, els, options = {}) {
$block
.
on
(
'
click
'
,
'
.js-assign-yourself
'
,
e
=>
{
e
.
preventDefault
();
return
assignTo
(
_this
.
currentUser
.
id
);
return
assignTo
(
userSelect
.
currentUser
.
id
);
});
assignTo
=
function
(
selected
)
{
...
...
@@ -229,7 +229,7 @@ function UsersSelect(currentUser, els, options = {}) {
return
$dropdown
.
glDropdown
({
showMenuAbove
,
data
(
term
,
callback
)
{
return
_this
.
users
(
term
,
options
,
users
=>
{
return
userSelect
.
users
(
term
,
options
,
users
=>
{
// GitLabDropdownFilter returns this.instance
// GitLabDropdownRemote returns this.options.instance
const
glDropdown
=
this
.
instance
||
this
.
options
.
instance
;
...
...
@@ -488,10 +488,7 @@ function UsersSelect(currentUser, els, options = {}) {
// Automatically close dropdown after assignee is selected
// since CE has no multiple assignees
// EE does not have a max-select
if
(
$dropdown
.
data
(
'
maxSelect
'
)
&&
getSelected
().
length
===
$dropdown
.
data
(
'
maxSelect
'
)
)
{
if
(
$dropdown
.
data
(
'
maxSelect
'
)
&&
getSelected
().
length
===
$dropdown
.
data
(
'
maxSelect
'
))
{
// Close the dropdown
$dropdown
.
dropdown
(
'
toggle
'
);
}
...
...
@@ -551,17 +548,13 @@ function UsersSelect(currentUser, els, options = {}) {
img
=
`<img src='
${
avatar
}
' class='avatar avatar-inline m-0' width='32' />`
;
}
return
_this
.
renderRow
(
options
.
issuableType
,
user
,
selected
,
username
,
img
);
return
userSelect
.
renderRow
(
options
.
issuableType
,
user
,
selected
,
username
,
img
);
},
});
};
})(
this
),
);
});
import
(
/* webpackChunkName: 'select2' */
'
select2/select2
'
)
.
then
(()
=>
{
$
(
'
.ajax-users-select
'
).
each
(
(
function
(
_this
)
{
return
function
(
i
,
select
)
{
$
(
'
.ajax-users-select
'
).
each
((
i
,
select
)
=>
{
const
options
=
{};
options
.
skipLdap
=
$
(
select
).
hasClass
(
'
skip_ldap
'
);
options
.
projectId
=
$
(
select
).
data
(
'
projectId
'
);
...
...
@@ -578,7 +571,7 @@ function UsersSelect(currentUser, els, options = {}) {
multiple
:
$
(
select
).
hasClass
(
'
multiselect
'
),
minimumInputLength
:
0
,
query
(
query
)
{
return
_this
.
users
(
query
.
term
,
options
,
users
=>
{
return
userSelect
.
users
(
query
.
term
,
options
,
users
=>
{
let
name
;
const
data
=
{
results
:
users
,
...
...
@@ -616,11 +609,7 @@ function UsersSelect(currentUser, els, options = {}) {
data
.
results
.
unshift
(
anyUser
);
}
}
if
(
showEmailUser
&&
data
.
results
.
length
===
0
&&
query
.
term
.
match
(
/^
[^
@
]
+@
[^
@
]
+$/
)
)
{
if
(
showEmailUser
&&
data
.
results
.
length
===
0
&&
query
.
term
.
match
(
/^
[^
@
]
+@
[^
@
]
+$/
))
{
const
trimmed
=
query
.
term
.
trim
();
const
emailUser
=
{
name
:
sprintf
(
__
(
'
Invite "%{trimmed}" by email
'
),
{
trimmed
}),
...
...
@@ -635,15 +624,15 @@ function UsersSelect(currentUser, els, options = {}) {
},
initSelection
()
{
const
args
=
1
<=
arguments
.
length
?
[].
slice
.
call
(
arguments
,
0
)
:
[];
return
_this
.
initSelection
.
apply
(
_this
,
args
);
return
userSelect
.
initSelection
.
apply
(
userSelect
,
args
);
},
formatResult
()
{
const
args
=
1
<=
arguments
.
length
?
[].
slice
.
call
(
arguments
,
0
)
:
[];
return
_this
.
formatResult
.
apply
(
_this
,
args
);
return
userSelect
.
formatResult
.
apply
(
userSelect
,
args
);
},
formatSelection
()
{
const
args
=
1
<=
arguments
.
length
?
[].
slice
.
call
(
arguments
,
0
)
:
[];
return
_this
.
formatSelection
.
apply
(
_this
,
args
);
return
userSelect
.
formatSelection
.
apply
(
userSelect
,
args
);
},
dropdownCssClass
:
'
ajax-users-dropdown
'
,
// we do not want to escape markup since we are displaying html in results
...
...
@@ -651,9 +640,7 @@ function UsersSelect(currentUser, els, options = {}) {
return
m
;
},
});
};
})(
this
),
);
});
})
.
catch
(()
=>
{});
}
...
...
changelogs/unreleased/34625-Remove-IIFEs-from-users_select-js.yml
0 → 100644
View file @
dad534d9
---
title
:
Remove IIFEs from users_select.js
merge_request
:
19290
author
:
minghuan lei
type
:
other
doc/ci/multi_project_pipelines.md
View file @
dad534d9
...
...
@@ -221,6 +221,7 @@ Some features are not implemented yet. For example, support for environments.
-
`trigger`
(to define a downstream pipeline trigger)
-
`stage`
-
`allow_failure`
-
[
`rules`
](
yaml/README.md#rules
)
-
`only`
and
`except`
-
`when`
(only with
`on_success`
,
`on_failure`
, and
`always`
values)
-
`extends`
qa/qa/page/project/job/show.rb
View file @
dad534d9
...
...
@@ -5,8 +5,8 @@ module QA::Page
class
Show
<
QA
::
Page
::
Base
include
Component
::
CiBadgeLink
view
'app/assets/javascripts/jobs/components/
job_
log.vue'
do
element
:
build_trace
view
'app/assets/javascripts/jobs/components/
log/
log.vue'
do
element
:
job_log_content
end
view
'app/assets/javascripts/jobs/components/stages_dropdown.vue'
do
...
...
@@ -25,7 +25,7 @@ module QA::Page
result
=
''
wait
(
reload:
false
,
max:
wait
,
interval:
1
)
do
result
=
find_element
(
:
build_trace
).
text
result
=
find_element
(
:
job_log_content
).
text
result
.
include?
(
'Job'
)
end
...
...
@@ -37,7 +37,7 @@ module QA::Page
def
loaded?
(
wait:
60
)
wait
(
reload:
true
,
max:
wait
,
interval:
1
)
do
has_element?
(
:
build_trace
,
wait:
1
)
has_element?
(
:
job_log_content
,
wait:
1
)
end
end
end
...
...
qa/qa/resource/merge_request.rb
View file @
dad534d9
...
...
@@ -54,7 +54,7 @@ module QA
@assignee
=
nil
@milestone
=
nil
@labels
=
[]
@file_name
=
"added_file.txt"
@file_name
=
"added_file
-
#{
SecureRandom
.
hex
(
8
)
}
.txt"
@file_content
=
"File Added"
@target_new_branch
=
true
@no_preparation
=
false
...
...
qa/qa/resource/merge_request_from_fork.rb
View file @
dad534d9
# frozen_string_literal: true
require
'securerandom'
module
QA
module
Resource
class
MergeRequestFromFork
<
MergeRequest
...
...
@@ -13,7 +15,7 @@ module QA
Repository
::
ProjectPush
.
fabricate!
do
|
resource
|
resource
.
project
=
fork
.
project
resource
.
branch_name
=
fork_branch
resource
.
file_name
=
'file2.txt'
resource
.
file_name
=
"file2-
#{
SecureRandom
.
hex
(
8
)
}
.txt"
resource
.
user
=
fork
.
user
end
end
...
...
qa/qa/resource/protected_branch.rb
View file @
dad534d9
# frozen_string_literal: true
require
'securerandom'
module
QA
module
Resource
class
ProtectedBranch
<
Base
...
...
@@ -15,7 +17,7 @@ module QA
attribute
:branch
do
Repository
::
ProjectPush
.
fabricate!
do
|
project_push
|
project_push
.
project
=
project
project_push
.
file_name
=
'new_file.md'
project_push
.
file_name
=
"new_file-
#{
SecureRandom
.
hex
(
8
)
}
.md"
project_push
.
commit_message
=
'Add new file'
project_push
.
branch_name
=
branch_name
project_push
.
new_branch
=
true
...
...
qa/qa/resource/repository/project_push.rb
View file @
dad534d9
# frozen_string_literal: true
require
'securerandom'
module
QA
module
Resource
module
Repository
...
...
@@ -15,7 +17,7 @@ module QA
end
def
initialize
@file_name
=
'file.txt'
@file_name
=
"file-
#{
SecureRandom
.
hex
(
8
)
}
.txt"
@file_content
=
'# This is test project'
@commit_message
=
"This is a test commit"
@branch_name
=
'master'
...
...
qa/qa/resource/repository/push.rb
View file @
dad534d9
# frozen_string_literal: true
require
'pathname'
require
'securerandom'
module
QA
module
Resource
...
...
@@ -13,7 +14,7 @@ module QA
attr_writer
:remote_branch
,
:gpg_key_id
def
initialize
@file_name
=
'file.txt'
@file_name
=
"file-
#{
SecureRandom
.
hex
(
8
)
}
.txt"
@file_content
=
'# This is test file'
@commit_message
=
"This is a test commit"
@branch_name
=
'master'
...
...
qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb
View file @
dad534d9
...
...
@@ -4,12 +4,7 @@ module QA
context
'Create'
do
describe
'Download merge request patch and diff'
do
before
(
:context
)
do
project
=
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'project'
end
@merge_request
=
Resource
::
MergeRequest
.
fabricate_via_api!
do
|
merge_request
|
merge_request
.
project
=
project
merge_request
.
title
=
'This is a merge request'
merge_request
.
description
=
'... for downloading patches and diffs'
end
...
...
@@ -23,7 +18,7 @@ module QA
expect
(
page
.
text
).
to
start_with
(
'From'
)
expect
(
page
).
to
have_content
(
'Subject: [PATCH] This is a test commit'
)
expect
(
page
).
to
have_content
(
'diff --git a/added_file.txt b/added_file.txt'
)
expect
(
page
).
to
have_content
(
"diff --git a/
#{
@merge_request
.
file_name
}
b/
#{
@merge_request
.
file_name
}
"
)
end
it
'views the merge request plain diff'
do
...
...
@@ -32,7 +27,7 @@ module QA
@merge_request
.
visit!
Page
::
MergeRequest
::
Show
.
perform
(
&
:view_plain_diff
)
expect
(
page
.
text
).
to
start_with
(
'diff --git a/added_file.txt b/added_file.txt'
)
expect
(
page
.
text
).
to
start_with
(
"diff --git a/
#{
@merge_request
.
file_name
}
b/
#{
@merge_request
.
file_name
}
"
)
expect
(
page
).
to
have_content
(
'+File Added'
)
end
end
...
...
qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb
View file @
dad534d9
...
...
@@ -6,10 +6,6 @@ module QA
context
'Release'
,
:docker
do
describe
'Git clone using a deploy key'
do
before
do
# Handle WIP Job Logs flag - https://gitlab.com/gitlab-org/gitlab/issues/31162
@job_log_json_flag_enabled
=
Runtime
::
Feature
.
enabled?
(
'job_log_json'
)
Runtime
::
Feature
.
disable
(
'job_log_json'
)
if
@job_log_json_flag_enabled
Flow
::
Login
.
sign_in
@runner_name
=
"qa-runner-
#{
Time
.
now
.
to_i
}
"
...
...
@@ -29,7 +25,6 @@ module QA
end
after
do
Runtime
::
Feature
.
enable
(
'job_log_json'
)
if
@job_log_json_flag_enabled
Service
::
DockerRun
::
GitlabRunner
.
new
(
@runner_name
).
remove!
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