diff --git a/.rubocop_manual_todo.yml b/.rubocop_manual_todo.yml index 185bbb36e60..c4e37e6c42f 100644 --- a/.rubocop_manual_todo.yml +++ b/.rubocop_manual_todo.yml @@ -2911,33 +2911,6 @@ Gitlab/NamespacedClass: - 'spec/tasks/gitlab/task_helpers_spec.rb' - 'spec/uploaders/object_storage_spec.rb' -# WIP: https://gitlab.com/gitlab-org/gitlab/-/issues/322739 -Style/HashTransformation: - Exclude: - - 'ee/app/models/ee/ci/build.rb' - - 'ee/app/models/productivity_analytics.rb' - - 'ee/app/models/sca/license_compliance.rb' - - 'ee/app/services/security/store_report_service.rb' - - 'ee/lib/ee/gitlab/auth/ldap/sync/group.rb' - - 'ee/lib/ee/gitlab/usage_data.rb' - - 'ee/lib/gitlab/custom_file_templates.rb' - - 'ee/spec/elastic_integration/global_search_spec.rb' - - 'ee/spec/lib/ee/gitlab/application_context_spec.rb' - - 'spec/lib/atlassian/jira_connect/serializers/pull_request_entity_spec.rb' - - 'spec/lib/gitlab/ci/status/composite_spec.rb' - - 'spec/lib/gitlab/conflict/file_spec.rb' - - 'spec/lib/gitlab/import_export/project/tree_restorer_spec.rb' - - 'spec/models/concerns/featurable_spec.rb' - - 'spec/models/event_spec.rb' - - 'spec/models/packages/dependency_spec.rb' - - 'spec/requests/api/graphql/project/alert_management/alert/assignees_spec.rb' - - 'spec/requests/api/graphql/project/alert_management/alert/notes_spec.rb' - - 'spec/requests/api/graphql/project/alert_management/alert/todos_spec.rb' - - 'spec/requests/api/projects_spec.rb' - - 'spec/support/helpers/graphql_helpers.rb' - - 'spec/support/import_export/project_tree_expectations.rb' - - 'spec/support/shared_contexts/services/projects/container_repository/delete_tags_service_shared_context.rb' - Style/ClassEqualityComparison: Exclude: - spec/lib/peek/views/active_record_spec.rb diff --git a/Gemfile b/Gemfile index ca9a3443639..876bcfaabf9 100644 --- a/Gemfile +++ b/Gemfile @@ -342,7 +342,6 @@ group :metrics do end group :development do - gem 'brakeman', '~> 4.10.0', require: false gem 'lefthook', '~> 0.7.0', require: false gem 'letter_opener_web', '~> 1.4.0' @@ -383,7 +382,7 @@ group :development, :test do gem 'benchmark-ips', '~> 2.3.0', require: false - gem 'knapsack', '~> 1.17' + gem 'knapsack', '~> 1.21.1' gem 'crystalball', '~> 0.7.0', require: false gem 'simple_po_parser', '~> 1.1.2', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 4ad1c2420a0..19fad573b63 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -151,7 +151,6 @@ GEM bootstrap_form (4.2.0) actionpack (>= 5.0) activemodel (>= 5.0) - brakeman (4.10.1) browser (4.2.0) builder (3.2.4) bullet (6.1.3) @@ -672,7 +671,7 @@ GEM kaminari-core (= 1.2.1) kaminari-core (1.2.1) kgio (2.11.3) - knapsack (1.17.0) + knapsack (1.21.1) rake kramdown (2.3.1) rexml @@ -1369,7 +1368,6 @@ DEPENDENCIES better_errors (~> 2.9.0) bootsnap (~> 1.4.6) bootstrap_form (~> 4.2.0) - brakeman (~> 4.10.0) browser (~> 4.2) bullet (~> 6.1.3) bundler-audit (~> 0.7.0.1) @@ -1476,7 +1474,7 @@ DEPENDENCIES json_schemer (~> 0.2.12) jwt (~> 2.1.0) kaminari (~> 1.0) - knapsack (~> 1.17) + knapsack (~> 1.21.1) kramdown (~> 2.3.1) kubeclient (~> 4.9.1) lefthook (~> 0.7.0) diff --git a/Rakefile b/Rakefile index 445542e5c00..eb2f158972d 100755 --- a/Rakefile +++ b/Rakefile @@ -4,6 +4,8 @@ # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. +Rake::TaskManager.record_task_metadata = true + require File.expand_path('config/application', __dir__) relative_url_conf = File.expand_path('config/initializers/relative_url', __dir__) diff --git a/app/assets/javascripts/batch_comments/mixins/resolved_status.js b/app/assets/javascripts/batch_comments/mixins/resolved_status.js index 85bdf6b7a36..bec360e3b2e 100644 --- a/app/assets/javascripts/batch_comments/mixins/resolved_status.js +++ b/app/assets/javascripts/batch_comments/mixins/resolved_status.js @@ -50,12 +50,18 @@ export default { return this.resolveDiscussion ? 'is-resolving-discussion' : 'is-unresolving-discussion'; }, resolveButtonTitle() { + const escapeParameters = false; + if (this.isDraft || this.discussionId) return this.resolvedStatusMessage; let title = __('Resolve thread'); if (this.resolvedBy) { - title = sprintf(__('Resolved by %{name}'), { name: this.resolvedBy.name }); + title = sprintf( + __('Resolved by %{name}'), + { name: this.resolvedBy.name }, + escapeParameters, + ); } return title; diff --git a/app/assets/javascripts/invite_member/init_invite_member_modal.js b/app/assets/javascripts/invite_member/init_invite_member_modal.js index 108f636ee3e..a50d31c9e7a 100644 --- a/app/assets/javascripts/invite_member/init_invite_member_modal.js +++ b/app/assets/javascripts/invite_member/init_invite_member_modal.js @@ -5,10 +5,13 @@ import InviteMemberModal from './components/invite_member_modal.vue'; Vue.use(GlToast); +const isAssigneesWidgetShown = + (isInIssuePage() || isInDesignPage()) && gon.features.issueAssigneesWidget; + export default function initInviteMembersModal() { const el = document.querySelector('.js-invite-member-modal'); - if (!el || isInDesignPage() || isInIssuePage()) { + if (!el || isAssigneesWidgetShown) { return false; } diff --git a/app/assets/javascripts/notes/components/note_form.vue b/app/assets/javascripts/notes/components/note_form.vue index a25862a587b..a70bac94b71 100644 --- a/app/assets/javascripts/notes/components/note_form.vue +++ b/app/assets/javascripts/notes/components/note_form.vue @@ -390,7 +390,7 @@ export default { -import { GlAlert, GlIcon } from '@gitlab/ui'; +import { GlIcon } from '@gitlab/ui'; import { uniqueId } from 'lodash'; -import { __, s__ } from '~/locale'; -import { DEFAULT, INVALID_CI_CONFIG } from '~/pipelines/constants'; +import { s__ } from '~/locale'; import EditorLite from '~/vue_shared/components/editor_lite.vue'; export default { i18n: { viewOnlyMessage: s__('Pipelines|Merged YAML is view only'), }, - errorTexts: { - [INVALID_CI_CONFIG]: __('Your CI configuration file is invalid.'), - [DEFAULT]: __('An unknown error occurred.'), - }, components: { EditorLite, - GlAlert, GlIcon, }, inject: ['ciConfigPath'], props: { - isValid: { - type: Boolean, - required: true, - }, ciConfigData: { type: Object, required: true, @@ -35,66 +25,30 @@ export default { }; }, computed: { - failure() { - switch (this.failureType) { - case INVALID_CI_CONFIG: - return this.$options.errorTexts[INVALID_CI_CONFIG]; - default: - return this.$options.errorTexts[DEFAULT]; - } - }, fileGlobalId() { return `${this.ciConfigPath}-${uniqueId()}`; }, - hasError() { - return this.failureType; - }, mergedYaml() { return this.ciConfigData.mergedYaml; }, }, - watch: { - ciConfigData: { - immediate: true, - handler() { - if (!this.isValid) { - this.reportFailure(INVALID_CI_CONFIG); - } else if (this.hasError) { - this.resetFailure(); - } - }, - }, - }, - methods: { - reportFailure(errorType) { - this.failureType = errorType; - }, - resetFailure() { - this.failureType = null; - }, - }, }; diff --git a/app/assets/javascripts/pipeline_editor/components/pipeline_editor_tabs.vue b/app/assets/javascripts/pipeline_editor/components/pipeline_editor_tabs.vue index 760d395ff2c..5acb3355b23 100644 --- a/app/assets/javascripts/pipeline_editor/components/pipeline_editor_tabs.vue +++ b/app/assets/javascripts/pipeline_editor/components/pipeline_editor_tabs.vue @@ -1,11 +1,13 @@ diff --git a/app/assets/javascripts/pipelines/components/notification/pipeline_notification.vue b/app/assets/javascripts/pipelines/components/notification/pipeline_notification.vue new file mode 100644 index 00000000000..6982586ab12 --- /dev/null +++ b/app/assets/javascripts/pipelines/components/notification/pipeline_notification.vue @@ -0,0 +1,90 @@ + + diff --git a/app/assets/javascripts/pipelines/components/pipeline_graph/pipeline_graph.vue b/app/assets/javascripts/pipelines/components/pipeline_graph/pipeline_graph.vue index 1f8c4a9aa8b..3ba0d7d0120 100644 --- a/app/assets/javascripts/pipelines/components/pipeline_graph/pipeline_graph.vue +++ b/app/assets/javascripts/pipelines/components/pipeline_graph/pipeline_graph.vue @@ -1,8 +1,7 @@