Commit 80cc3c94 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents ad750ebd 5eeb1b78
......@@ -21,7 +21,7 @@ module Mutations
description: "The current state of the collection"
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 }
end
......
......@@ -17,7 +17,7 @@
.js-notification-toggle-btns
%div{ class: ("btn-group" 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-default.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")
= notification_title(notification_setting.level)
%button.btn.dropdown-toggle.d-flex{ data: { toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } }
......
---
title: Fix broken button default class
merge_request: 43977
author:
type: fixed
......@@ -6,9 +6,9 @@ Gitlab::Seeder.quiet do
model_class = Analytics::InstanceStatistics::Measurement
recorded_at = Date.today
# Insert random counts for the last 10 weeks
measurements = 10.times.flat_map do
recorded_at = (recorded_at - 1.week).end_of_week.end_of_day - 5.minutes
# Insert random counts for the last 60 days
measurements = 60.times.flat_map do
recorded_at = (recorded_at - 1.day).end_of_day - 5.minutes
model_class.identifiers.map do |_, id|
{
......
<script>
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';
export default {
name: 'GroupRepositoryAnalytics',
components: {
TestCoverageTable,
DownloadTestCoverage,
},
mixins: [glFeatureFlagsMixin()],
text: {
codeCoverageHeader: s__('RepositoriesAnalytics|Test Code Coverage'),
},
computed: {
shouldShowCoverageReport() {
return this.glFeatures.groupCoverageDataReport;
},
},
};
</script>
......@@ -18,6 +27,7 @@ export default {
<h4 data-testid="test-coverage-header">
{{ $options.text.codeCoverageHeader }}
</h4>
<test-coverage-table v-if="shouldShowCoverageReport" />
<download-test-coverage />
</div>
</template>
<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>
......@@ -59,6 +59,9 @@ export default {
isIssueAlreadyCreated() {
return Boolean(this.state.relatedIssues.find(i => i.lockIssueRemoval));
},
canCreateIssue() {
return !this.isIssueAlreadyCreated && !this.isFetching && Boolean(this.createIssueUrl);
},
},
inject: {
vulnerabilityId: {
......@@ -261,7 +264,7 @@ export default {
<template #headerText>
{{ $options.i18n.relatedIssues }}
</template>
<template v-if="!isIssueAlreadyCreated && !isFetching" #headerActions>
<template v-if="canCreateIssue" #headerActions>
<gl-button
ref="createIssue"
variant="success"
......
......@@ -8,6 +8,7 @@ class Groups::Analytics::RepositoryAnalyticsController < Groups::Analytics::Appl
before_action :load_group
before_action -> { check_feature_availability!(: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
track_event(pageview_tracker_params)
......
......@@ -4,9 +4,6 @@ module Projects
class LicensesController < Projects::ApplicationController
before_action :authorize_read_licenses!, only: [:index]
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
respond_to do |format|
......
......@@ -143,7 +143,6 @@ module EE
end
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 if has_approved_license_check?
......
---
title: Hide "Create Issue" On Vulnerability Page When Issues Are Disabled
merge_request: 43725
author: Kev @KevSlashNull
type: fixed
---
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
---
name: license_compliance_denies_mr
introduced_by_url:
rollout_issue_url:
group: composition_analysis
type: development
default_enabled: true
......@@ -33,7 +33,7 @@ describe('Vulnerability related issues component', () => {
const issue1 = { id: 3, vulnerabilityLinkId: 987 };
const issue2 = { id: 25, vulnerabilityLinkId: 876 };
const createWrapper = async (data = {}, opts) => {
const createWrapper = async (data = {}, provide = {}, opts) => {
wrapper = shallowMount(RelatedIssues, {
propsData,
data: () => data,
......@@ -44,6 +44,7 @@ describe('Vulnerability related issues component', () => {
reportType,
issueTrackingHelpPath,
permissionsHelpPath,
...provide,
},
...opts,
});
......@@ -270,6 +271,7 @@ describe('Vulnerability related issues component', () => {
isFetching: false,
state: { relatedIssues: [issue1, { ...issue2, vulnerabilityLinkType: 'created' }] },
},
{},
{ stubs: { RelatedIssuesBlock } },
);
});
......@@ -289,7 +291,7 @@ describe('Vulnerability related issues component', () => {
beforeEach(async () => {
mockAxios.onGet(propsData.endpoint).replyOnce(httpStatusCodes.OK, [issue1, issue2]);
createWrapper({}, { stubs: { RelatedIssuesBlock } });
createWrapper({}, {}, { stubs: { RelatedIssuesBlock } });
await axios.waitForAll();
});
......@@ -327,4 +329,17 @@ describe('Vulnerability related issues component', () => {
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);
});
});
});
......@@ -25,7 +25,7 @@ RSpec.describe "Internal references", :js do
add_note("##{public_project_issue.to_reference(private_project)}")
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
sign_in(public_project_user)
......@@ -52,7 +52,7 @@ RSpec.describe "Internal references", :js do
visit(project_issue_path(public_project, public_project_issue))
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
expect(page).not_to have_content("#merge-requests .merge-requests-title")
end
......@@ -94,7 +94,7 @@ RSpec.describe "Internal references", :js do
add_note("##{public_project_merge_request.to_reference(private_project)}")
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
sign_in(public_project_user)
......@@ -121,7 +121,7 @@ RSpec.describe "Internal references", :js do
visit(project_merge_request_path(public_project, public_project_merge_request))
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
expect(page).not_to have_content("#merge-requests .merge-requests-title")
end
......
......@@ -18,7 +18,7 @@ RSpec.describe 'User creates release', :js do
project.add_developer(user)
gitlab_sign_in(user)
sign_in(user)
visit new_page_url
......
......@@ -13,7 +13,7 @@ RSpec.describe 'User edits Release', :js do
project.add_developer(user)
gitlab_sign_in(user)
sign_in(user)
visit edit_project_release_path(project, release)
......
......@@ -16,7 +16,7 @@ RSpec.describe 'User views releases', :js do
shared_examples 'releases page' do
context('when the user is a maintainer') do
before do
gitlab_sign_in(maintainer)
sign_in(maintainer)
end
it 'sees the release' do
......@@ -110,7 +110,7 @@ RSpec.describe 'User views releases', :js do
context('when the user is a guest') do
before do
gitlab_sign_in(guest)
sign_in(guest)
end
it 'renders release info except for Git-related data' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment