diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index 94d91326842..92f84f69b44 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -1701,9 +1701,6 @@ # Run tests automatically for MRs that touch QA files - <<: *if-merge-request changes: *qa-patterns - # Run tests automatically for MRS that touch GITALY_SERVER_VERSION - - <<: *if-merge-request - changes: *gitaly-patterns # Otherwise, only run tests after the MR is approved - <<: *if-merge-request-not-approved when: never @@ -2366,6 +2363,9 @@ changes: *code-backstage-qa-patterns - <<: *if-merge-request changes: *workhorse-patterns + - <<: *if-merge-request + changes: *rubocop-patterns + .rails:rules:detect-previous-failed-tests: rules: diff --git a/.rubocop_todo/layout/argument_alignment.yml b/.rubocop_todo/layout/argument_alignment.yml index 1ac09bfa157..9d1a620b048 100644 --- a/.rubocop_todo/layout/argument_alignment.yml +++ b/.rubocop_todo/layout/argument_alignment.yml @@ -86,22 +86,6 @@ Layout/ArgumentAlignment: - 'app/graphql/types/notes/update_diff_image_position_input_type.rb' - 'app/graphql/types/packages/cleanup/policy_type.rb' - 'app/graphql/types/packages/file_metadata_type.rb' - - 'app/graphql/types/work_items/widgets/hierarchy_type.rb' - - 'app/graphql/types/work_items/widgets/hierarchy_update_input_type.rb' - - 'app/graphql/types/work_items/widgets/labels_update_input_type.rb' - - 'app/graphql/types/work_items/widgets/milestone_input_type.rb' - - 'app/graphql/types/work_items/widgets/milestone_type.rb' - - 'app/graphql/types/work_items/widgets/start_and_due_date_update_input_type.rb' - - 'app/graphql/types/x509_certificate_type.rb' - - 'app/graphql/types/x509_issuer_type.rb' - - 'app/services/lfs/lock_file_service.rb' - - 'app/services/markdown_content_rewriter_service.rb' - - 'app/services/members/base_service.rb' - - 'app/services/ml/experiment_tracking/experiment_repository.rb' - - 'app/services/post_receive_service.rb' - - 'app/services/preview_markdown_service.rb' - - 'app/services/protected_branches/api_service.rb' - - 'app/services/protected_branches/legacy_api_create_service.rb' - 'ee/app/graphql/ee/mutations/issues/create.rb' - 'ee/app/graphql/ee/mutations/issues/update.rb' - 'ee/app/graphql/ee/mutations/work_items/create.rb' diff --git a/.rubocop_todo/lint/or_assignment_to_constant.yml b/.rubocop_todo/lint/or_assignment_to_constant.yml deleted file mode 100644 index 64ebe9e49b9..00000000000 --- a/.rubocop_todo/lint/or_assignment_to_constant.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# Cop supports --autocorrect. -Lint/OrAssignmentToConstant: - Exclude: - - 'lib/gitlab/email/handler/base_handler.rb' - - 'tooling/danger/project_helper.rb' diff --git a/.rubocop_todo/lint/redundant_string_coercion.yml b/.rubocop_todo/lint/redundant_string_coercion.yml deleted file mode 100644 index 2663e0420b3..00000000000 --- a/.rubocop_todo/lint/redundant_string_coercion.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# Cop supports --autocorrect. -Lint/RedundantStringCoercion: - Exclude: - - 'ee/bin/geo_log_cursor' - - 'ee/db/fixtures/development/31_devops_adoption.rb' diff --git a/.rubocop_todo/migration/ensure_factory_for_table.yml b/.rubocop_todo/migration/ensure_factory_for_table.yml index f5a8c65853c..96f9b79d1e8 100644 --- a/.rubocop_todo/migration/ensure_factory_for_table.yml +++ b/.rubocop_todo/migration/ensure_factory_for_table.yml @@ -56,3 +56,4 @@ Migration/EnsureFactoryForTable: - 'db/migrate/20240304184128_create_ci_build_names_table.rb' - 'db/migrate/20240306121653_create_relation_import_tracker.rb' - 'db/migrate/20240404192955_create_early_access_program_tracking_events.rb' + - 'db/migrate/20240423064716_create_ci_build_execution_config.rb' diff --git a/.rubocop_todo/rspec/env_mocking.yml b/.rubocop_todo/rspec/env_mocking.yml deleted file mode 100644 index c9e0dad986b..00000000000 --- a/.rubocop_todo/rspec/env_mocking.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# Cop supports --autocorrect. -RSpec/EnvMocking: - Exclude: - - 'ee/spec/lib/gitlab/elastic/client_spec.rb' - - 'spec/initializers/net_http_patch_spec.rb' - - 'spec/lib/gitlab/database/reflection_spec.rb' diff --git a/app/assets/javascripts/content_editor/components/wrappers/code_block.vue b/app/assets/javascripts/content_editor/components/wrappers/code_block.vue index 497413ab452..6f20a424eac 100644 --- a/app/assets/javascripts/content_editor/components/wrappers/code_block.vue +++ b/app/assets/javascripts/content_editor/components/wrappers/code_block.vue @@ -134,7 +134,7 @@ export default { if (!this.editor.isActive('diagram')) return; - this.diagramSource = this.$refs.nodeViewContent.$el.textContent; + this.diagramSource = this.$refs.nodeViewContent?.$el.textContent || ''; if (this.node.attrs.language !== 'mermaid') { this.diagramUrl = await this.contentEditor.renderDiagram( diff --git a/app/assets/javascripts/content_editor/extensions/code_suggestion.js b/app/assets/javascripts/content_editor/extensions/code_suggestion.js index 45090d57559..33e0dd13289 100644 --- a/app/assets/javascripts/content_editor/extensions/code_suggestion.js +++ b/app/assets/javascripts/content_editor/extensions/code_suggestion.js @@ -67,7 +67,7 @@ export default CodeBlockHighlight.extend({ return [ { priority: PARSE_HTML_PRIORITY_HIGHEST, - tag: 'pre[lang="suggestion"]', + tag: 'pre[data-canonical-lang="suggestion"]', }, ]; }, diff --git a/app/assets/javascripts/content_editor/extensions/diagram.js b/app/assets/javascripts/content_editor/extensions/diagram.js index 7c4a56468eb..60c337bc572 100644 --- a/app/assets/javascripts/content_editor/extensions/diagram.js +++ b/app/assets/javascripts/content_editor/extensions/diagram.js @@ -39,7 +39,7 @@ export default CodeBlockHighlight.extend({ return [ { priority: PARSE_HTML_PRIORITY_HIGHEST, - tag: 'pre[lang="mermaid"]', + tag: 'pre[data-canonical-lang="mermaid"]', getAttrs: () => ({ language: 'mermaid' }), }, { diff --git a/app/assets/javascripts/deploy_keys/index.js b/app/assets/javascripts/deploy_keys/index.js index 673462073f0..af25b2261a5 100644 --- a/app/assets/javascripts/deploy_keys/index.js +++ b/app/assets/javascripts/deploy_keys/index.js @@ -7,6 +7,9 @@ Vue.use(VueApollo); export default () => { const el = document.getElementById('js-deploy-keys'); + + if (!el) return false; + return new Vue({ el, apolloProvider: createApolloProvider({ diff --git a/app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue b/app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue index 958916fd9b0..57fbc661237 100644 --- a/app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue +++ b/app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue @@ -2,7 +2,6 @@ import { GlFormGroup, GlFormCheckbox, GlFormInput } from '@gitlab/ui'; // eslint-disable-next-line no-restricted-imports import { mapGetters } from 'vuex'; -import { s__, __ } from '~/locale'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; export default { @@ -65,38 +64,15 @@ export default { data() { return { enableJiraIssues: this.initialEnableJiraIssues, - projectKey: this.initialProjectKey, projectKeys: this.initialProjectKeys, }; }, computed: { ...mapGetters(['isInheriting']), - multipleProjectKeys() { - return this.glFeatures.jiraMultipleProjectKeys; - }, - checkboxDisabled() { return !this.showJiraIssuesIntegration || this.isInheriting; }, - - validProjectKey() { - // Allow saving the form without project_key when feature flag is enabled. - // This will be improved in https://gitlab.com/gitlab-org/gitlab/-/issues/452161. - if (this.multipleProjectKeys) { - return true; - } - - return !this.enableJiraIssues || Boolean(this.projectKey) || !this.isValidated; - }, - }, - i18n: { - enableCheckboxHelp: s__( - 'JiraService|Warning: All users with access to this GitLab project can view all issues from the Jira project you specify.', - ), - projectKeyLabel: s__('JiraService|Jira project key'), - projectKeyPlaceholder: s__('JiraService|AB'), - requiredFieldFeedback: __('This field is required.'), }, }; @@ -112,14 +88,18 @@ export default { > {{ s__('JiraService|View Jira issues') }}
- -