diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-12 15:08:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-12 15:08:35 +0300 |
commit | 8ef107c43390ea9c9932afb55d1318e4716fbf3b (patch) | |
tree | ad35474f833e8da50107d8ca1e348f9a953c8d7c /app | |
parent | e0df184fb182633972212cd62d6e3dc6e4bd0e62 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
9 files changed, 35 insertions, 22 deletions
diff --git a/app/assets/javascripts/batch_comments/stores/modules/batch_comments/getters.js b/app/assets/javascripts/batch_comments/stores/modules/batch_comments/getters.js index 75e4ae63c18..28b9100c5f3 100644 --- a/app/assets/javascripts/batch_comments/stores/modules/batch_comments/getters.js +++ b/app/assets/javascripts/batch_comments/stores/modules/batch_comments/getters.js @@ -71,7 +71,7 @@ export const draftsForLine = (state, getters) => (diffFileSha, line, side = null const showDraftsForThisSide = showDraftOnSide(line, side); if (showDraftsForThisSide && draftsForFile?.[key]) { - return draftsForFile[key]; + return draftsForFile[key].filter((d) => d.position.position_type === 'text'); } return []; }; diff --git a/app/assets/javascripts/diffs/components/diff_file.vue b/app/assets/javascripts/diffs/components/diff_file.vue index 4ffdcd78422..8e1c6cecbd1 100644 --- a/app/assets/javascripts/diffs/components/diff_file.vue +++ b/app/assets/javascripts/diffs/components/diff_file.vue @@ -465,18 +465,18 @@ export default { </gl-alert> <div v-if="showFileDiscussions" class="gl-border-b" data-testid="file-discussions"> <div class="diff-file-discussions-wrapper"> - <diff-file-drafts - :file-hash="file.file_hash" - :show-pin="false" - :position-type="$options.FILE_DIFF_POSITION_TYPE" - class="diff-file-discussions" - /> <diff-discussions v-if="fileDiscussions.length" class="diff-file-discussions" data-testid="diff-file-discussions" :discussions="fileDiscussions" /> + <diff-file-drafts + :file-hash="file.file_hash" + :show-pin="false" + :position-type="$options.FILE_DIFF_POSITION_TYPE" + class="diff-file-discussions" + /> <note-form v-if="file.hasCommentForm" :save-button-title="__('Comment')" diff --git a/app/assets/javascripts/pages/groups/new/components/app.vue b/app/assets/javascripts/pages/groups/new/components/app.vue index 167f56bbfcf..3ee15077d00 100644 --- a/app/assets/javascripts/pages/groups/new/components/app.vue +++ b/app/assets/javascripts/pages/groups/new/components/app.vue @@ -39,6 +39,11 @@ export default { required: false, default: false, }, + isSaas: { + type: Boolean, + required: false, + default: false, + }, }, computed: { initialBreadcrumbs() { @@ -93,6 +98,7 @@ export default { :initial-breadcrumbs="initialBreadcrumbs" :panels="panels" :title="s__('GroupsNew|Create new group')" + :is-saas="isSaas" persistence-key="new_group_last_active_tab" /> </template> diff --git a/app/assets/javascripts/pages/groups/new/index.js b/app/assets/javascripts/pages/groups/new/index.js index 2e53324717c..84e031ae67a 100644 --- a/app/assets/javascripts/pages/groups/new/index.js +++ b/app/assets/javascripts/pages/groups/new/index.js @@ -27,6 +27,7 @@ function initNewGroupCreation(el) { parentGroupUrl, parentGroupName, importExistingGroupPath, + isSaas, } = el.dataset; const props = { @@ -36,6 +37,7 @@ function initNewGroupCreation(el) { parentGroupName, importExistingGroupPath, hasErrors: parseBoolean(hasErrors), + isSaas: parseBoolean(isSaas), }; const apolloProvider = new VueApollo({ diff --git a/app/assets/javascripts/sentry/index.js b/app/assets/javascripts/sentry/index.js index ea835945aa9..cf6a79fe939 100644 --- a/app/assets/javascripts/sentry/index.js +++ b/app/assets/javascripts/sentry/index.js @@ -13,7 +13,7 @@ const index = function index() { process.env.NODE_ENV === 'production' ? [gon.gitlab_url] : [gon.gitlab_url, 'webpack-internal://'], - release: gon.revision, + release: gon?.version, tags: { revision: gon?.revision, feature_category: gon?.feature_category, diff --git a/app/assets/javascripts/vue_shared/new_namespace/new_namespace_page.vue b/app/assets/javascripts/vue_shared/new_namespace/new_namespace_page.vue index c8c7deff882..5ab2e346a7a 100644 --- a/app/assets/javascripts/vue_shared/new_namespace/new_namespace_page.vue +++ b/app/assets/javascripts/vue_shared/new_namespace/new_namespace_page.vue @@ -43,6 +43,11 @@ export default { type: String, required: true, }, + isSaas: { + type: Boolean, + required: false, + default: false, + }, }, data() { @@ -81,11 +86,7 @@ export default { }, showNewTopLevelGroupAlert() { - if (this.activePanel.detailProps === undefined) { - return false; - } - - return this.activePanel.detailProps.parentGroupName === ''; + return this.isSaas && this.activePanel.detailProps?.parentGroupName === ''; }, showSuperSidebarToggle() { diff --git a/app/controllers/graphql_controller.rb b/app/controllers/graphql_controller.rb index 0d348624864..3d3b7f31dfd 100644 --- a/app/controllers/graphql_controller.rb +++ b/app/controllers/graphql_controller.rb @@ -276,7 +276,8 @@ class GraphqlController < ApplicationController def execute_introspection_query if introspection_query_can_use_cache? - log_introspection_query_message(true) + Gitlab::AppLogger.info(message: "IntrospectionQueryCache hit") + log_introspection_query_cache_details(true) # Context for caching: https://gitlab.com/gitlab-org/gitlab/-/issues/409448 Rails.cache.fetch( @@ -285,7 +286,8 @@ class GraphqlController < ApplicationController execute_query.to_json end else - log_introspection_query_message(false) + Gitlab::AppLogger.info(message: "IntrospectionQueryCache miss") + log_introspection_query_cache_details(false) execute_query end @@ -304,13 +306,13 @@ class GraphqlController < ApplicationController ['introspection-query-cache', Gitlab.revision, context[:remove_deprecated]] end - def log_introspection_query_message(can_use_introspection_query_cache) + def log_introspection_query_cache_details(can_use_introspection_query_cache) Gitlab::AppLogger.info( message: "IntrospectionQueryCache", - can_use_introspection_query_cache: can_use_introspection_query_cache, + can_use_introspection_query_cache: can_use_introspection_query_cache.to_s, query: query, - variables: build_variables(params[:variables]), - introspection_query_cache_key: introspection_query_cache_key + variables: build_variables(params[:variables]).to_s, + introspection_query_cache_key: introspection_query_cache_key.to_s ) end end diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb index 2ced1bec5e9..a4f463a23be 100644 --- a/app/helpers/groups_helper.rb +++ b/app/helpers/groups_helper.rb @@ -85,6 +85,7 @@ module GroupsHelper end end + # Overridden in EE def remove_group_message(group) _("You are going to remove %{group_name}. This will also delete all of its subgroups and projects. Removed groups CANNOT be restored! Are you ABSOLUTELY sure?") % { group_name: group.name } @@ -128,7 +129,8 @@ module GroupsHelper { parent_group_url: group.parent && group_url(group.parent), parent_group_name: group.parent&.name, - import_existing_group_path: new_group_path(parent_id: group.parent_id, anchor: 'import-group-pane') + import_existing_group_path: new_group_path(parent_id: group.parent_id, anchor: 'import-group-pane'), + is_saas: Gitlab.com?.to_s } end diff --git a/app/models/integrations/hangouts_chat.rb b/app/models/integrations/hangouts_chat.rb index c903e8d9eb8..ad82f1b916f 100644 --- a/app/models/integrations/hangouts_chat.rb +++ b/app/models/integrations/hangouts_chat.rb @@ -58,9 +58,9 @@ module Integrations when Integrations::ChatMessage::NoteMessage message.target when Integrations::ChatMessage::IssueMessage - "issue #{Issue.reference_prefix}#{message.issue_iid}" + "issue #{message.project_name}#{Issue.reference_prefix}#{message.issue_iid}" when Integrations::ChatMessage::MergeMessage - "merge request #{MergeRequest.reference_prefix}#{message.merge_request_iid}" + "merge request #{message.project_name}#{MergeRequest.reference_prefix}#{message.merge_request_iid}" when Integrations::ChatMessage::PushMessage "push #{message.project_name}_#{message.ref}" when Integrations::ChatMessage::PipelineMessage |