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
bfed9bca
Commit
bfed9bca
authored
Mar 03, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
f425cba0
f0cff10a
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
83 additions
and
38 deletions
+83
-38
.gitlab/ci/rules.gitlab-ci.yml
.gitlab/ci/rules.gitlab-ci.yml
+10
-0
app/views/dashboard/projects/_projects.html.haml
app/views/dashboard/projects/_projects.html.haml
+1
-1
app/views/projects/runners/_runner.html.haml
app/views/projects/runners/_runner.html.haml
+1
-1
changelogs/unreleased/209061-remove-dashboard-pipeline-status-ff.yml
...unreleased/209061-remove-dashboard-pipeline-status-ff.yml
+5
-0
changelogs/unreleased/gl-badge-runners.yml
changelogs/unreleased/gl-badge-runners.yml
+5
-0
changelogs/unreleased/sfang-do-not-show-token-name.yml
changelogs/unreleased/sfang-do-not-show-token-name.yml
+5
-0
config/feature_flags/development/dashboard_pipeline_status.yml
...g/feature_flags/development/dashboard_pipeline_status.yml
+0
-8
ee/app/assets/javascripts/groups/settings/compliance_frameworks/components/delete_modal.vue
...ettings/compliance_frameworks/components/delete_modal.vue
+5
-4
ee/app/assets/javascripts/groups/settings/compliance_frameworks/components/list.vue
...groups/settings/compliance_frameworks/components/list.vue
+11
-8
ee/spec/frontend/groups/settings/compliance_frameworks/components/delete_modal_spec.js
...ngs/compliance_frameworks/components/delete_modal_spec.js
+1
-1
ee/spec/frontend/groups/settings/compliance_frameworks/components/list_spec.js
...ps/settings/compliance_frameworks/components/list_spec.js
+14
-5
lib/api/entities/user_safe.rb
lib/api/entities/user_safe.rb
+2
-1
spec/features/dashboard/projects_spec.rb
spec/features/dashboard/projects_spec.rb
+0
-8
spec/features/projects/members/list_spec.rb
spec/features/projects/members/list_spec.rb
+1
-1
spec/lib/api/entities/user_spec.rb
spec/lib/api/entities/user_spec.rb
+18
-0
spec/support/helpers/features/members_table_helpers.rb
spec/support/helpers/features/members_table_helpers.rb
+4
-0
No files found.
.gitlab/ci/rules.gitlab-ci.yml
View file @
bfed9bca
...
@@ -405,6 +405,7 @@
...
@@ -405,6 +405,7 @@
-
<<
:
*if-security-merge-request
-
<<
:
*if-security-merge-request
changes
:
*code-backstage-patterns
changes
:
*code-backstage-patterns
-
<<
:
*if-merge-request-title-as-if-foss
-
<<
:
*if-merge-request-title-as-if-foss
-
<<
:
*if-merge-request-title-run-all-rspec
-
<<
:
*if-merge-request
-
<<
:
*if-merge-request
changes
:
*ci-patterns
changes
:
*ci-patterns
...
@@ -483,6 +484,7 @@
...
@@ -483,6 +484,7 @@
-
<<
:
*if-security-merge-request
-
<<
:
*if-security-merge-request
changes
:
*code-qa-patterns
changes
:
*code-qa-patterns
-
<<
:
*if-merge-request-title-as-if-foss
-
<<
:
*if-merge-request-title-as-if-foss
-
<<
:
*if-merge-request-title-run-all-rspec
-
<<
:
*if-merge-request
-
<<
:
*if-merge-request
changes
:
*ci-patterns
changes
:
*ci-patterns
...
@@ -700,6 +702,7 @@
...
@@ -700,6 +702,7 @@
changes
:
*db-patterns
changes
:
*db-patterns
-
<<
:
*if-merge-request-title-as-if-foss
-
<<
:
*if-merge-request-title-as-if-foss
changes
:
*db-patterns
changes
:
*db-patterns
-
<<
:
*if-merge-request-title-run-all-rspec
-
<<
:
*if-merge-request
-
<<
:
*if-merge-request
changes
:
*ci-patterns
changes
:
*ci-patterns
...
@@ -716,6 +719,7 @@
...
@@ -716,6 +719,7 @@
changes
:
*db-patterns
changes
:
*db-patterns
-
<<
:
*if-merge-request-title-as-if-foss
-
<<
:
*if-merge-request-title-as-if-foss
changes
:
*db-patterns
changes
:
*db-patterns
-
<<
:
*if-merge-request-title-run-all-rspec
.rails:rules:as-if-foss-unit:
.rails:rules:as-if-foss-unit:
rules
:
rules
:
...
@@ -725,6 +729,7 @@
...
@@ -725,6 +729,7 @@
changes
:
*backend-patterns
changes
:
*backend-patterns
-
<<
:
*if-merge-request-title-as-if-foss
-
<<
:
*if-merge-request-title-as-if-foss
changes
:
*backend-patterns
changes
:
*backend-patterns
-
<<
:
*if-merge-request-title-run-all-rspec
-
<<
:
*if-merge-request
-
<<
:
*if-merge-request
changes
:
*ci-patterns
changes
:
*ci-patterns
...
@@ -741,6 +746,7 @@
...
@@ -741,6 +746,7 @@
changes
:
*backend-patterns
changes
:
*backend-patterns
-
<<
:
*if-merge-request-title-as-if-foss
-
<<
:
*if-merge-request-title-as-if-foss
changes
:
*backend-patterns
changes
:
*backend-patterns
-
<<
:
*if-merge-request-title-run-all-rspec
.rails:rules:as-if-foss-integration:
.rails:rules:as-if-foss-integration:
rules
:
rules
:
...
@@ -750,6 +756,7 @@
...
@@ -750,6 +756,7 @@
changes
:
*backend-patterns
changes
:
*backend-patterns
-
<<
:
*if-merge-request-title-as-if-foss
-
<<
:
*if-merge-request-title-as-if-foss
changes
:
*backend-patterns
changes
:
*backend-patterns
-
<<
:
*if-merge-request-title-run-all-rspec
-
<<
:
*if-merge-request
-
<<
:
*if-merge-request
changes
:
*ci-patterns
changes
:
*ci-patterns
...
@@ -766,6 +773,7 @@
...
@@ -766,6 +773,7 @@
changes
:
*backend-patterns
changes
:
*backend-patterns
-
<<
:
*if-merge-request-title-as-if-foss
-
<<
:
*if-merge-request-title-as-if-foss
changes
:
*backend-patterns
changes
:
*backend-patterns
-
<<
:
*if-merge-request-title-run-all-rspec
.rails:rules:as-if-foss-system:
.rails:rules:as-if-foss-system:
rules
:
rules
:
...
@@ -775,6 +783,7 @@
...
@@ -775,6 +783,7 @@
changes
:
*code-backstage-patterns
changes
:
*code-backstage-patterns
-
<<
:
*if-merge-request-title-as-if-foss
-
<<
:
*if-merge-request-title-as-if-foss
changes
:
*code-backstage-patterns
changes
:
*code-backstage-patterns
-
<<
:
*if-merge-request-title-run-all-rspec
-
<<
:
*if-merge-request
-
<<
:
*if-merge-request
changes
:
*ci-patterns
changes
:
*ci-patterns
...
@@ -791,6 +800,7 @@
...
@@ -791,6 +800,7 @@
changes
:
*code-backstage-patterns
changes
:
*code-backstage-patterns
-
<<
:
*if-merge-request-title-as-if-foss
-
<<
:
*if-merge-request-title-as-if-foss
changes
:
*code-backstage-patterns
changes
:
*code-backstage-patterns
-
<<
:
*if-merge-request-title-run-all-rspec
.rails:rules:ee-and-foss-db-library-code:
.rails:rules:ee-and-foss-db-library-code:
rules
:
rules
:
...
...
app/views/dashboard/projects/_projects.html.haml
View file @
bfed9bca
=
render
'shared/projects/list'
,
projects:
@projects
,
pipeline_status:
Feature
.
enabled?
(
:dashboard_pipeline_status
,
default_enabled:
true
)
,
user:
current_user
=
render
'shared/projects/list'
,
projects:
@projects
,
pipeline_status:
true
,
user:
current_user
app/views/projects/runners/_runner.html.haml
View file @
bfed9bca
...
@@ -40,5 +40,5 @@
...
@@ -40,5 +40,5 @@
-
if
runner
.
tags
.
present?
-
if
runner
.
tags
.
present?
%p
%p
-
runner
.
tags
.
map
(
&
:name
).
sort
.
each
do
|
tag
|
-
runner
.
tags
.
map
(
&
:name
).
sort
.
each
do
|
tag
|
%span
.badge.badge-primary
%span
.badge.
gl-badge.sm.badge-pill.
badge-primary
=
tag
=
tag
changelogs/unreleased/209061-remove-dashboard-pipeline-status-ff.yml
0 → 100644
View file @
bfed9bca
---
title
:
Remove dashboard_pipeline_status feature flag
merge_request
:
55472
author
:
type
:
other
changelogs/unreleased/gl-badge-runners.yml
0 → 100644
View file @
bfed9bca
---
title
:
Apply new GitLab UI for badge in runners list
merge_request
:
54766
author
:
Yogi (@yo)
type
:
changed
changelogs/unreleased/sfang-do-not-show-token-name.yml
0 → 100644
View file @
bfed9bca
---
title
:
Do not expose user name if user is project bot
merge_request
:
54022
author
:
type
:
changed
config/feature_flags/development/dashboard_pipeline_status.yml
deleted
100644 → 0
View file @
f425cba0
---
name
:
dashboard_pipeline_status
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/22029
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/209061
milestone
:
'
12.7'
type
:
development
group
:
group::continuous integration
default_enabled
:
true
ee/app/assets/javascripts/groups/settings/compliance_frameworks/components/delete_modal.vue
View file @
bfed9bca
...
@@ -37,13 +37,14 @@ export default {
...
@@ -37,13 +37,14 @@ export default {
this
.
reportDeleting
();
this
.
reportDeleting
();
try
{
try
{
const
{
id
}
=
this
;
const
{
const
{
data
:
{
destroyComplianceFramework
},
data
:
{
destroyComplianceFramework
},
}
=
await
this
.
$apollo
.
mutate
({
}
=
await
this
.
$apollo
.
mutate
({
mutation
:
deleteComplianceFrameworkMutation
,
mutation
:
deleteComplianceFrameworkMutation
,
variables
:
{
variables
:
{
input
:
{
input
:
{
id
:
this
.
id
,
id
,
},
},
},
},
awaitRefetchQueries
:
true
,
awaitRefetchQueries
:
true
,
...
@@ -62,7 +63,7 @@ export default {
...
@@ -62,7 +63,7 @@ export default {
if
(
error
)
{
if
(
error
)
{
this
.
reportError
(
new
Error
(
error
));
this
.
reportError
(
new
Error
(
error
));
}
else
{
}
else
{
this
.
reportSuccess
();
this
.
reportSuccess
(
id
);
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
this
.
reportError
(
error
);
this
.
reportError
(
error
);
...
@@ -75,8 +76,8 @@ export default {
...
@@ -75,8 +76,8 @@ export default {
Sentry
.
captureException
(
error
);
Sentry
.
captureException
(
error
);
this
.
$emit
(
'
error
'
);
this
.
$emit
(
'
error
'
);
},
},
reportSuccess
()
{
reportSuccess
(
id
)
{
this
.
$emit
(
'
delete
'
);
this
.
$emit
(
'
delete
'
,
id
);
},
},
show
()
{
show
()
{
this
.
$refs
.
modal
.
show
();
this
.
$refs
.
modal
.
show
();
...
...
ee/app/assets/javascripts/groups/settings/compliance_frameworks/components/list.vue
View file @
bfed9bca
...
@@ -39,7 +39,7 @@ export default {
...
@@ -39,7 +39,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
markedForDeletion
:
{},
markedForDeletion
:
{},
deletingFramework
:
null
,
deletingFramework
sIds
:
[]
,
complianceFrameworks
:
[],
complianceFrameworks
:
[],
error
:
''
,
error
:
''
,
message
:
''
,
message
:
''
,
...
@@ -70,7 +70,7 @@ export default {
...
@@ -70,7 +70,7 @@ export default {
},
},
computed
:
{
computed
:
{
isLoading
()
{
isLoading
()
{
return
this
.
$apollo
.
loading
&&
!
this
.
deletingFramework
;
return
this
.
$apollo
.
loading
&&
this
.
deletingFrameworksIds
.
length
===
0
;
},
},
hasLoaded
()
{
hasLoaded
()
{
return
!
this
.
isLoading
&&
!
this
.
error
;
return
!
this
.
isLoading
&&
!
this
.
error
;
...
@@ -105,15 +105,18 @@ export default {
...
@@ -105,15 +105,18 @@ export default {
onError
()
{
onError
()
{
this
.
error
=
this
.
$options
.
i18n
.
deleteError
;
this
.
error
=
this
.
$options
.
i18n
.
deleteError
;
},
},
onDelete
()
{
onDelete
(
id
)
{
this
.
message
=
this
.
$options
.
i18n
.
deleteMessage
;
this
.
message
=
this
.
$options
.
i18n
.
deleteMessage
;
this
.
deletingFramework
=
null
;
const
idx
=
this
.
deletingFrameworksIds
.
indexOf
(
id
);
if
(
idx
>
-
1
)
{
this
.
deletingFrameworksIds
.
splice
(
idx
,
1
);
}
},
},
onDeleting
()
{
onDeleting
()
{
this
.
deletingFramework
=
this
.
markedForDeletion
;
this
.
deletingFramework
sIds
.
push
(
this
.
markedForDeletion
.
id
)
;
},
},
isDeleting
(
framework
)
{
isDeleting
(
id
)
{
return
this
.
deletingFramework
===
framework
;
return
this
.
deletingFramework
sIds
.
includes
(
id
)
;
},
},
},
},
i18n
:
{
i18n
:
{
...
@@ -153,7 +156,7 @@ export default {
...
@@ -153,7 +156,7 @@ export default {
v-for=
"framework in complianceFrameworks"
v-for=
"framework in complianceFrameworks"
:key=
"framework.parsedId"
:key=
"framework.parsedId"
:framework=
"framework"
:framework=
"framework"
:loading=
"isDeleting(framework)"
:loading=
"isDeleting(framework
.id
)"
@
delete=
"markForDeletion"
@
delete=
"markForDeletion"
/>
/>
</gl-tab>
</gl-tab>
...
...
ee/spec/frontend/groups/settings/compliance_frameworks/components/delete_modal_spec.js
View file @
bfed9bca
...
@@ -117,7 +117,7 @@ describe('DeleteModal', () => {
...
@@ -117,7 +117,7 @@ describe('DeleteModal', () => {
await
waitForPromises
();
await
waitForPromises
();
expect
(
wrapper
.
emitted
(
'
delete
'
)
).
toHaveLength
(
1
);
expect
(
wrapper
.
emitted
(
'
delete
'
)
[
0
]).
toEqual
([
frameworkFoundResponse
.
id
]
);
});
});
it
(
'
emits "error" event and reports to Sentry when there is a network error
'
,
async
()
=>
{
it
(
'
emits "error" event and reports to Sentry when there is a network error
'
,
async
()
=>
{
...
...
ee/spec/frontend/groups/settings/compliance_frameworks/components/list_spec.js
View file @
bfed9bca
...
@@ -213,13 +213,18 @@ describe('List', () => {
...
@@ -213,13 +213,18 @@ describe('List', () => {
expect
(
findDeleteModal
().
vm
.
show
).
toHaveBeenCalled
();
expect
(
findDeleteModal
().
vm
.
show
).
toHaveBeenCalled
();
});
});
describe
(
'
and
the item is
being deleted
'
,
()
=>
{
describe
(
'
and
multiple items are
being deleted
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
findDeleteModal
().
vm
.
$emit
(
'
deleting
'
);
findListItems
().
wrappers
.
forEach
((
listItem
)
=>
{
listItem
.
vm
.
$emit
(
'
delete
'
,
listItem
.
props
(
'
framework
'
));
findDeleteModal
().
vm
.
$emit
(
'
deleting
'
);
});
});
});
it
(
'
sets "loading" to true on the marked list item
'
,
()
=>
{
it
(
'
sets "loading" to true on the deleting list items
'
,
()
=>
{
expect
(
findListItem
().
props
(
'
loading
'
)).
toBe
(
true
);
expect
(
findListItems
().
wrappers
.
every
((
listItem
)
=>
listItem
.
props
(
'
loading
'
))).
toBe
(
true
,
);
});
});
describe
(
'
and an error occurred
'
,
()
=>
{
describe
(
'
and an error occurred
'
,
()
=>
{
...
@@ -238,10 +243,14 @@ describe('List', () => {
...
@@ -238,10 +243,14 @@ describe('List', () => {
describe
(
'
and the item was successfully deleted
'
,
()
=>
{
describe
(
'
and the item was successfully deleted
'
,
()
=>
{
beforeEach
(
async
()
=>
{
beforeEach
(
async
()
=>
{
findDeleteModal
().
vm
.
$emit
(
'
delete
'
);
findDeleteModal
().
vm
.
$emit
(
'
delete
'
,
framework
.
id
);
await
waitForPromises
();
await
waitForPromises
();
});
});
it
(
'
sets "loading" to false on the deleted list item
'
,
()
=>
{
expect
(
findListItem
().
props
(
'
loading
'
)).
toBe
(
false
);
});
it
(
'
shows the alert for the success message
'
,
()
=>
{
it
(
'
shows the alert for the success message
'
,
()
=>
{
expect
(
findAlert
().
props
(
'
dismissible
'
)).
toBe
(
true
);
expect
(
findAlert
().
props
(
'
dismissible
'
)).
toBe
(
true
);
expect
(
findAlert
().
props
(
'
variant
'
)).
toBe
(
'
info
'
);
expect
(
findAlert
().
props
(
'
variant
'
)).
toBe
(
'
info
'
);
...
...
lib/api/entities/user_safe.rb
View file @
bfed9bca
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
module
API
module
API
module
Entities
module
Entities
class
UserSafe
<
Grape
::
Entity
class
UserSafe
<
Grape
::
Entity
expose
:id
,
:name
,
:username
expose
:id
,
:username
expose
:name
,
unless:
->
(
user
)
{
user
.
project_bot?
&&
!
options
[
:current_user
].
admin?
}
end
end
end
end
end
end
spec/features/dashboard/projects_spec.rb
View file @
bfed9bca
...
@@ -198,14 +198,6 @@ RSpec.describe 'Dashboard Projects' do
...
@@ -198,14 +198,6 @@ RSpec.describe 'Dashboard Projects' do
it_behaves_like
'hidden pipeline status'
it_behaves_like
'hidden pipeline status'
end
end
context
'when dashboard_pipeline_status is disabled'
do
before
do
stub_feature_flags
(
dashboard_pipeline_status:
false
)
end
it_behaves_like
'hidden pipeline status'
end
context
"when last_pipeline is missing"
do
context
"when last_pipeline is missing"
do
before
do
before
do
project
.
last_pipeline
.
delete
project
.
last_pipeline
.
delete
...
...
spec/features/projects/members/list_spec.rb
View file @
bfed9bca
...
@@ -127,7 +127,7 @@ RSpec.describe 'Project members list' do
...
@@ -127,7 +127,7 @@ RSpec.describe 'Project members list' do
it
'does not show form used to change roles and "Expiration date" or the remove user button'
do
it
'does not show form used to change roles and "Expiration date" or the remove user button'
do
visit_members_page
visit_members_page
page
.
within
find_
member
_row
(
project_bot
)
do
page
.
within
find_
username
_row
(
project_bot
)
do
expect
(
page
).
not_to
have_button
(
'Maintainer'
)
expect
(
page
).
not_to
have_button
(
'Maintainer'
)
expect
(
page
).
to
have_field
(
'Expiration date'
,
disabled:
true
)
expect
(
page
).
to
have_field
(
'Expiration date'
,
disabled:
true
)
expect
(
page
).
not_to
have_button
(
'Remove member'
)
expect
(
page
).
not_to
have_button
(
'Remove member'
)
...
...
spec/lib/api/entities/user_spec.rb
View file @
bfed9bca
...
@@ -35,4 +35,22 @@ RSpec.describe API::Entities::User do
...
@@ -35,4 +35,22 @@ RSpec.describe API::Entities::User do
expect
(
subject
[
:bot
]).
to
eq
(
true
)
expect
(
subject
[
:bot
]).
to
eq
(
true
)
end
end
end
end
context
'with project bot user'
do
let
(
:user
)
{
create
(
:user
,
:project_bot
)
}
context
'when the requester is not an admin'
do
it
'does not expose project bot user name'
do
expect
(
subject
).
not_to
include
(
:name
)
end
end
context
'when the requester is an admin'
do
let
(
:current_user
)
{
create
(
:user
,
:admin
)
}
it
'exposes project bot user name'
do
expect
(
subject
).
to
include
(
:name
)
end
end
end
end
end
spec/support/helpers/features/members_table_helpers.rb
View file @
bfed9bca
...
@@ -41,6 +41,10 @@ module Spec
...
@@ -41,6 +41,10 @@ module Spec
find_row
(
user
.
name
)
find_row
(
user
.
name
)
end
end
def
find_username_row
(
user
)
find_row
(
user
.
username
)
end
def
find_invited_member_row
(
email
)
def
find_invited_member_row
(
email
)
find_row
(
email
)
find_row
(
email
)
end
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