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
80cc3c94
Commit
80cc3c94
authored
Oct 01, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
ad750ebd
5eeb1b78
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
114 additions
and
63 deletions
+114
-63
app/graphql/mutations/design_management/move.rb
app/graphql/mutations/design_management/move.rb
+1
-1
app/views/shared/notifications/_button.html.haml
app/views/shared/notifications/_button.html.haml
+1
-1
changelogs/unreleased/notificaion-button-class.yml
changelogs/unreleased/notificaion-button-class.yml
+5
-0
db/fixtures/development/29_instance_statistics.rb
db/fixtures/development/29_instance_statistics.rb
+3
-3
doc/administration/geo/replication/datatypes.md
doc/administration/geo/replication/datatypes.md
+30
-36
ee/app/assets/javascripts/analytics/repository_analytics/components/group_repository_analytics.vue
...itory_analytics/components/group_repository_analytics.vue
+10
-0
ee/app/assets/javascripts/analytics/repository_analytics/components/test_coverage_table.vue
...s/repository_analytics/components/test_coverage_table.vue
+22
-0
ee/app/assets/javascripts/vulnerabilities/components/related_issues.vue
...javascripts/vulnerabilities/components/related_issues.vue
+4
-1
ee/app/controllers/groups/analytics/repository_analytics_controller.rb
...llers/groups/analytics/repository_analytics_controller.rb
+1
-0
ee/app/controllers/projects/licenses_controller.rb
ee/app/controllers/projects/licenses_controller.rb
+0
-3
ee/app/models/ee/merge_request.rb
ee/app/models/ee/merge_request.rb
+0
-1
ee/changelogs/unreleased/241757-Hide-Create-Issue-When-Tracker-Disabled.yml
...leased/241757-Hide-Create-Issue-When-Tracker-Disabled.yml
+5
-0
ee/config/feature_flags/development/group_coverage_data_report.yml
.../feature_flags/development/group_coverage_data_report.yml
+7
-0
ee/config/feature_flags/development/license_compliance_denies_mr.yml
...eature_flags/development/license_compliance_denies_mr.yml
+0
-7
ee/spec/frontend/vulnerabilities/related_issues_spec.js
ee/spec/frontend/vulnerabilities/related_issues_spec.js
+17
-2
spec/features/issuables/markdown_references/internal_references_spec.rb
...issuables/markdown_references/internal_references_spec.rb
+4
-4
spec/features/projects/releases/user_creates_release_spec.rb
spec/features/projects/releases/user_creates_release_spec.rb
+1
-1
spec/features/projects/releases/user_views_edit_release_spec.rb
...eatures/projects/releases/user_views_edit_release_spec.rb
+1
-1
spec/features/projects/releases/user_views_releases_spec.rb
spec/features/projects/releases/user_views_releases_spec.rb
+2
-2
No files found.
app/graphql/mutations/design_management/move.rb
View file @
80cc3c94
...
@@ -21,7 +21,7 @@ module Mutations
...
@@ -21,7 +21,7 @@ module Mutations
description:
"The current state of the collection"
description:
"The current state of the collection"
def
resolve
(
**
args
)
def
resolve
(
**
args
)
service
=
::
DesignManagement
::
MoveDesignsService
.
new
(
current_user
,
parameters
(
args
))
service
=
::
DesignManagement
::
MoveDesignsService
.
new
(
current_user
,
parameters
(
**
args
))
{
design_collection:
service
.
collection
,
errors:
service
.
execute
.
errors
}
{
design_collection:
service
.
collection
,
errors:
service
.
execute
.
errors
}
end
end
...
...
app/views/shared/notifications/_button.html.haml
View file @
80cc3c94
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
.js-notification-toggle-btns
.js-notification-toggle-btns
%div
{
class:
(
"btn-group"
if
notification_setting
.
custom?
)
}
%div
{
class:
(
"btn-group"
if
notification_setting
.
custom?
)
}
-
if
notification_setting
.
custom?
-
if
notification_setting
.
custom?
%button
.dropdown-new.btn.btn-defaul.btn-icon.gl-button.has-tooltip.notifications-btn.text-left
#notifications-button
{
type:
"button"
,
title:
button_title
,
class:
"#{btn_class}"
,
"aria-label"
=>
aria_label
,
data:
{
container:
"body"
,
toggle:
"modal"
,
target:
"#"
+
notifications_menu_identifier
(
"modal"
,
notification_setting
),
display:
'static'
}
}
%button
.dropdown-new.btn.btn-defaul
t
.btn-icon.gl-button.has-tooltip.notifications-btn.text-left
#notifications-button
{
type:
"button"
,
title:
button_title
,
class:
"#{btn_class}"
,
"aria-label"
=>
aria_label
,
data:
{
container:
"body"
,
toggle:
"modal"
,
target:
"#"
+
notifications_menu_identifier
(
"modal"
,
notification_setting
),
display:
'static'
}
}
=
sprite_icon
(
"notifications"
,
css_class:
"js-notification-loading"
)
=
sprite_icon
(
"notifications"
,
css_class:
"js-notification-loading"
)
=
notification_title
(
notification_setting
.
level
)
=
notification_title
(
notification_setting
.
level
)
%button
.btn.dropdown-toggle.d-flex
{
data:
{
toggle:
"dropdown"
,
target:
notifications_menu_identifier
(
"dropdown"
,
notification_setting
),
flip:
"false"
}
}
%button
.btn.dropdown-toggle.d-flex
{
data:
{
toggle:
"dropdown"
,
target:
notifications_menu_identifier
(
"dropdown"
,
notification_setting
),
flip:
"false"
}
}
...
...
changelogs/unreleased/notificaion-button-class.yml
0 → 100644
View file @
80cc3c94
---
title
:
Fix broken button default class
merge_request
:
43977
author
:
type
:
fixed
db/fixtures/development/29_instance_statistics.rb
View file @
80cc3c94
...
@@ -6,9 +6,9 @@ Gitlab::Seeder.quiet do
...
@@ -6,9 +6,9 @@ Gitlab::Seeder.quiet do
model_class
=
Analytics
::
InstanceStatistics
::
Measurement
model_class
=
Analytics
::
InstanceStatistics
::
Measurement
recorded_at
=
Date
.
today
recorded_at
=
Date
.
today
# Insert random counts for the last
10 week
s
# Insert random counts for the last
60 day
s
measurements
=
1
0
.
times
.
flat_map
do
measurements
=
6
0
.
times
.
flat_map
do
recorded_at
=
(
recorded_at
-
1
.
week
).
end_of_week
.
end_of_day
-
5
.
minutes
recorded_at
=
(
recorded_at
-
1
.
day
)
.
end_of_day
-
5
.
minutes
model_class
.
identifiers
.
map
do
|
_
,
id
|
model_class
.
identifiers
.
map
do
|
_
,
id
|
{
{
...
...
doc/administration/geo/replication/datatypes.md
View file @
80cc3c94
This diff is collapsed.
Click to expand it.
ee/app/assets/javascripts/analytics/repository_analytics/components/group_repository_analytics.vue
View file @
80cc3c94
<
script
>
<
script
>
import
{
s__
}
from
'
~/locale
'
;
import
{
s__
}
from
'
~/locale
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
TestCoverageTable
from
'
./test_coverage_table.vue
'
;
import
DownloadTestCoverage
from
'
./download_test_coverage.vue
'
;
import
DownloadTestCoverage
from
'
./download_test_coverage.vue
'
;
export
default
{
export
default
{
name
:
'
GroupRepositoryAnalytics
'
,
name
:
'
GroupRepositoryAnalytics
'
,
components
:
{
components
:
{
TestCoverageTable
,
DownloadTestCoverage
,
DownloadTestCoverage
,
},
},
mixins
:
[
glFeatureFlagsMixin
()],
text
:
{
text
:
{
codeCoverageHeader
:
s__
(
'
RepositoriesAnalytics|Test Code Coverage
'
),
codeCoverageHeader
:
s__
(
'
RepositoriesAnalytics|Test Code Coverage
'
),
},
},
computed
:
{
shouldShowCoverageReport
()
{
return
this
.
glFeatures
.
groupCoverageDataReport
;
},
},
};
};
</
script
>
</
script
>
...
@@ -18,6 +27,7 @@ export default {
...
@@ -18,6 +27,7 @@ export default {
<h4
data-testid=
"test-coverage-header"
>
<h4
data-testid=
"test-coverage-header"
>
{{
$options
.
text
.
codeCoverageHeader
}}
{{
$options
.
text
.
codeCoverageHeader
}}
</h4>
</h4>
<test-coverage-table
v-if=
"shouldShowCoverageReport"
/>
<download-test-coverage
/>
<download-test-coverage
/>
</div>
</div>
</
template
>
</
template
>
ee/app/assets/javascripts/analytics/repository_analytics/components/test_coverage_table.vue
0 → 100644
View file @
80cc3c94
<
script
>
import
{
GlCard
}
from
'
@gitlab/ui
'
;
import
{
s__
}
from
'
~/locale
'
;
export
default
{
name
:
'
TestCoverageTable
'
,
components
:
{
GlCard
,
},
text
:
{
// This is a temporary placeholder until we actually implement the feature
header
:
s__
(
'
RepositoriesAnalytics|Test Code Coverage
'
),
},
};
</
script
>
<
template
>
<gl-card>
<template
#header
>
<h5>
{{
$options
.
text
.
header
}}
</h5>
</
template
>
</gl-card>
</template>
ee/app/assets/javascripts/vulnerabilities/components/related_issues.vue
View file @
80cc3c94
...
@@ -59,6 +59,9 @@ export default {
...
@@ -59,6 +59,9 @@ export default {
isIssueAlreadyCreated
()
{
isIssueAlreadyCreated
()
{
return
Boolean
(
this
.
state
.
relatedIssues
.
find
(
i
=>
i
.
lockIssueRemoval
));
return
Boolean
(
this
.
state
.
relatedIssues
.
find
(
i
=>
i
.
lockIssueRemoval
));
},
},
canCreateIssue
()
{
return
!
this
.
isIssueAlreadyCreated
&&
!
this
.
isFetching
&&
Boolean
(
this
.
createIssueUrl
);
},
},
},
inject
:
{
inject
:
{
vulnerabilityId
:
{
vulnerabilityId
:
{
...
@@ -261,7 +264,7 @@ export default {
...
@@ -261,7 +264,7 @@ export default {
<
template
#headerText
>
<
template
#headerText
>
{{
$options
.
i18n
.
relatedIssues
}}
{{
$options
.
i18n
.
relatedIssues
}}
</
template
>
</
template
>
<
template
v-if=
"
!isIssueAlreadyCreated && !isFetching
"
#headerActions
>
<
template
v-if=
"
canCreateIssue
"
#headerActions
>
<gl-button
<gl-button
ref=
"createIssue"
ref=
"createIssue"
variant=
"success"
variant=
"success"
...
...
ee/app/controllers/groups/analytics/repository_analytics_controller.rb
View file @
80cc3c94
...
@@ -8,6 +8,7 @@ class Groups::Analytics::RepositoryAnalyticsController < Groups::Analytics::Appl
...
@@ -8,6 +8,7 @@ class Groups::Analytics::RepositoryAnalyticsController < Groups::Analytics::Appl
before_action
:load_group
before_action
:load_group
before_action
->
{
check_feature_availability!
(
:group_repository_analytics
)
}
before_action
->
{
check_feature_availability!
(
:group_repository_analytics
)
}
before_action
->
{
authorize_view_by_action!
(
:read_group_repository_analytics
)
}
before_action
->
{
authorize_view_by_action!
(
:read_group_repository_analytics
)
}
before_action
->
{
push_frontend_feature_flag
(
:group_coverage_data_report
,
@group
,
default_enabled:
false
)
}
def
show
def
show
track_event
(
pageview_tracker_params
)
track_event
(
pageview_tracker_params
)
...
...
ee/app/controllers/projects/licenses_controller.rb
View file @
80cc3c94
...
@@ -4,9 +4,6 @@ module Projects
...
@@ -4,9 +4,6 @@ module Projects
class
LicensesController
<
Projects
::
ApplicationController
class
LicensesController
<
Projects
::
ApplicationController
before_action
:authorize_read_licenses!
,
only:
[
:index
]
before_action
:authorize_read_licenses!
,
only:
[
:index
]
before_action
:authorize_admin_software_license_policy!
,
only:
[
:create
,
:update
]
before_action
:authorize_admin_software_license_policy!
,
only:
[
:create
,
:update
]
before_action
do
push_frontend_feature_flag
(
:license_compliance_denies_mr
,
default_enabled:
true
)
end
def
index
def
index
respond_to
do
|
format
|
respond_to
do
|
format
|
...
...
ee/app/models/ee/merge_request.rb
View file @
80cc3c94
...
@@ -143,7 +143,6 @@ module EE
...
@@ -143,7 +143,6 @@ module EE
end
end
def
has_denied_policies?
def
has_denied_policies?
return
false
if
::
Feature
.
disabled?
(
:license_compliance_denies_mr
,
project
,
default_enabled:
true
)
return
false
unless
has_license_scanning_reports?
return
false
unless
has_license_scanning_reports?
return
false
if
has_approved_license_check?
return
false
if
has_approved_license_check?
...
...
ee/changelogs/unreleased/241757-Hide-Create-Issue-When-Tracker-Disabled.yml
0 → 100644
View file @
80cc3c94
---
title
:
Hide "Create Issue" On Vulnerability Page When Issues Are Disabled
merge_request
:
43725
author
:
Kev @KevSlashNull
type
:
fixed
ee/config/feature_flags/development/group_coverage_data_report.yml
0 → 100644
View file @
80cc3c94
---
name
:
group_coverage_data_report
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/43774
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/215135/
type
:
development
group
:
group::testing
default_enabled
:
false
ee/config/feature_flags/development/license_compliance_denies_mr.yml
deleted
100644 → 0
View file @
ad750ebd
---
name
:
license_compliance_denies_mr
introduced_by_url
:
rollout_issue_url
:
group
:
composition_analysis
type
:
development
default_enabled
:
true
ee/spec/frontend/vulnerabilities/related_issues_spec.js
View file @
80cc3c94
...
@@ -33,7 +33,7 @@ describe('Vulnerability related issues component', () => {
...
@@ -33,7 +33,7 @@ describe('Vulnerability related issues component', () => {
const
issue1
=
{
id
:
3
,
vulnerabilityLinkId
:
987
};
const
issue1
=
{
id
:
3
,
vulnerabilityLinkId
:
987
};
const
issue2
=
{
id
:
25
,
vulnerabilityLinkId
:
876
};
const
issue2
=
{
id
:
25
,
vulnerabilityLinkId
:
876
};
const
createWrapper
=
async
(
data
=
{},
opts
)
=>
{
const
createWrapper
=
async
(
data
=
{},
provide
=
{},
opts
)
=>
{
wrapper
=
shallowMount
(
RelatedIssues
,
{
wrapper
=
shallowMount
(
RelatedIssues
,
{
propsData
,
propsData
,
data
:
()
=>
data
,
data
:
()
=>
data
,
...
@@ -44,6 +44,7 @@ describe('Vulnerability related issues component', () => {
...
@@ -44,6 +44,7 @@ describe('Vulnerability related issues component', () => {
reportType
,
reportType
,
issueTrackingHelpPath
,
issueTrackingHelpPath
,
permissionsHelpPath
,
permissionsHelpPath
,
...
provide
,
},
},
...
opts
,
...
opts
,
});
});
...
@@ -270,6 +271,7 @@ describe('Vulnerability related issues component', () => {
...
@@ -270,6 +271,7 @@ describe('Vulnerability related issues component', () => {
isFetching
:
false
,
isFetching
:
false
,
state
:
{
relatedIssues
:
[
issue1
,
{
...
issue2
,
vulnerabilityLinkType
:
'
created
'
}]
},
state
:
{
relatedIssues
:
[
issue1
,
{
...
issue2
,
vulnerabilityLinkType
:
'
created
'
}]
},
},
},
{},
{
stubs
:
{
RelatedIssuesBlock
}
},
{
stubs
:
{
RelatedIssuesBlock
}
},
);
);
});
});
...
@@ -289,7 +291,7 @@ describe('Vulnerability related issues component', () => {
...
@@ -289,7 +291,7 @@ describe('Vulnerability related issues component', () => {
beforeEach
(
async
()
=>
{
beforeEach
(
async
()
=>
{
mockAxios
.
onGet
(
propsData
.
endpoint
).
replyOnce
(
httpStatusCodes
.
OK
,
[
issue1
,
issue2
]);
mockAxios
.
onGet
(
propsData
.
endpoint
).
replyOnce
(
httpStatusCodes
.
OK
,
[
issue1
,
issue2
]);
createWrapper
({},
{
stubs
:
{
RelatedIssuesBlock
}
});
createWrapper
({},
{
},
{
stubs
:
{
RelatedIssuesBlock
}
});
await
axios
.
waitForAll
();
await
axios
.
waitForAll
();
});
});
...
@@ -327,4 +329,17 @@ describe('Vulnerability related issues component', () => {
...
@@ -327,4 +329,17 @@ describe('Vulnerability related issues component', () => {
expect
(
findAlert
().
exists
()).
toBe
(
false
);
expect
(
findAlert
().
exists
()).
toBe
(
false
);
});
});
});
});
describe
(
'
when project issue tracking is disabled
'
,
()
=>
{
it
(
'
hides the "Create Issue" button
'
,
()
=>
{
createWrapper
(
{},
{
createIssueUrl
:
undefined
,
},
);
expect
(
findCreateIssueButton
().
exists
()).
toBe
(
false
);
});
});
});
});
spec/features/issuables/markdown_references/internal_references_spec.rb
View file @
80cc3c94
...
@@ -25,7 +25,7 @@ RSpec.describe "Internal references", :js do
...
@@ -25,7 +25,7 @@ RSpec.describe "Internal references", :js do
add_note
(
"#
#{
public_project_issue
.
to_reference
(
private_project
)
}
"
)
add_note
(
"#
#{
public_project_issue
.
to_reference
(
private_project
)
}
"
)
end
end
context
"when user doesn't have access to private project"
do
context
"when user doesn't have access to private project"
,
quarantine:
'https://gitlab.com/gitlab-org/gitlab/-/issues/257832'
do
before
do
before
do
sign_in
(
public_project_user
)
sign_in
(
public_project_user
)
...
@@ -52,7 +52,7 @@ RSpec.describe "Internal references", :js do
...
@@ -52,7 +52,7 @@ RSpec.describe "Internal references", :js do
visit
(
project_issue_path
(
public_project
,
public_project_issue
))
visit
(
project_issue_path
(
public_project
,
public_project_issue
))
end
end
it
"doesn't show any references"
do
it
"doesn't show any references"
,
quarantine:
'https://gitlab.com/gitlab-org/gitlab/-/issues/257832'
do
page
.
within
(
".issue-details"
)
do
page
.
within
(
".issue-details"
)
do
expect
(
page
).
not_to
have_content
(
"#merge-requests .merge-requests-title"
)
expect
(
page
).
not_to
have_content
(
"#merge-requests .merge-requests-title"
)
end
end
...
@@ -94,7 +94,7 @@ RSpec.describe "Internal references", :js do
...
@@ -94,7 +94,7 @@ RSpec.describe "Internal references", :js do
add_note
(
"#
#{
public_project_merge_request
.
to_reference
(
private_project
)
}
"
)
add_note
(
"#
#{
public_project_merge_request
.
to_reference
(
private_project
)
}
"
)
end
end
context
"when user doesn't have access to private project"
do
context
"when user doesn't have access to private project"
,
quarantine:
'https://gitlab.com/gitlab-org/gitlab/-/issues/257832'
do
before
do
before
do
sign_in
(
public_project_user
)
sign_in
(
public_project_user
)
...
@@ -121,7 +121,7 @@ RSpec.describe "Internal references", :js do
...
@@ -121,7 +121,7 @@ RSpec.describe "Internal references", :js do
visit
(
project_merge_request_path
(
public_project
,
public_project_merge_request
))
visit
(
project_merge_request_path
(
public_project
,
public_project_merge_request
))
end
end
it
"doesn't show any references"
do
it
"doesn't show any references"
,
quarantine:
'https://gitlab.com/gitlab-org/gitlab/-/issues/257832'
do
page
.
within
(
".merge-request-details"
)
do
page
.
within
(
".merge-request-details"
)
do
expect
(
page
).
not_to
have_content
(
"#merge-requests .merge-requests-title"
)
expect
(
page
).
not_to
have_content
(
"#merge-requests .merge-requests-title"
)
end
end
...
...
spec/features/projects/releases/user_creates_release_spec.rb
View file @
80cc3c94
...
@@ -18,7 +18,7 @@ RSpec.describe 'User creates release', :js do
...
@@ -18,7 +18,7 @@ RSpec.describe 'User creates release', :js do
project
.
add_developer
(
user
)
project
.
add_developer
(
user
)
gitlab_
sign_in
(
user
)
sign_in
(
user
)
visit
new_page_url
visit
new_page_url
...
...
spec/features/projects/releases/user_views_edit_release_spec.rb
View file @
80cc3c94
...
@@ -13,7 +13,7 @@ RSpec.describe 'User edits Release', :js do
...
@@ -13,7 +13,7 @@ RSpec.describe 'User edits Release', :js do
project
.
add_developer
(
user
)
project
.
add_developer
(
user
)
gitlab_
sign_in
(
user
)
sign_in
(
user
)
visit
edit_project_release_path
(
project
,
release
)
visit
edit_project_release_path
(
project
,
release
)
...
...
spec/features/projects/releases/user_views_releases_spec.rb
View file @
80cc3c94
...
@@ -16,7 +16,7 @@ RSpec.describe 'User views releases', :js do
...
@@ -16,7 +16,7 @@ RSpec.describe 'User views releases', :js do
shared_examples
'releases page'
do
shared_examples
'releases page'
do
context
(
'when the user is a maintainer'
)
do
context
(
'when the user is a maintainer'
)
do
before
do
before
do
gitlab_
sign_in
(
maintainer
)
sign_in
(
maintainer
)
end
end
it
'sees the release'
do
it
'sees the release'
do
...
@@ -110,7 +110,7 @@ RSpec.describe 'User views releases', :js do
...
@@ -110,7 +110,7 @@ RSpec.describe 'User views releases', :js do
context
(
'when the user is a guest'
)
do
context
(
'when the user is a guest'
)
do
before
do
before
do
gitlab_
sign_in
(
guest
)
sign_in
(
guest
)
end
end
it
'renders release info except for Git-related data'
do
it
'renders release info except for Git-related data'
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