From 91e8c3a6efea1d805cfa86e7ade9a9628344cf89 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 12 Oct 2021 09:09:35 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .../components/issues_list_app.vue | 18 +-- app/assets/javascripts/issues_list/index.js | 4 +- .../components/details_page/tags_list_row.vue | 3 +- .../queries/epic.fragment.graphql | 15 ++ .../queries/search_epics.query.graphql | 16 ++ .../filtered_search_bar/tokens/base_token.vue | 26 +++- .../filtered_search_bar/tokens/epic_token.vue | 138 ++++++++---------- app/graphql/mutations/ci/runner/delete.rb | 2 +- .../customer_relations/contacts/create.rb | 2 +- .../customer_relations/contacts/update.rb | 61 ++++++++ .../organizations/create.rb | 2 +- .../organizations/update.rb | 2 +- .../types/customer_relations/contact_type.rb | 2 +- .../customer_relations/organization_type.rb | 2 +- app/graphql/types/mutation_type.rb | 1 + app/models/ci/runner.rb | 18 +-- app/models/clusters/applications/runner.rb | 2 +- .../contacts/update_service.rb | 24 +++ app/views/admin/runners/show.html.haml | 2 +- app/views/groups/runners/_runner.html.haml | 2 +- .../gitaly_user_merge_branch_access_error.yml | 8 + doc/api/graphql/reference/index.md | 41 +++++- doc/api/integrations.md | 34 +++++ doc/user/application_security/dast/index.md | 11 +- lib/api/ci/runners.rb | 4 +- lib/api/helpers/integrations_helpers.rb | 2 +- .../fix_first_mentioned_in_commit_at.rb | 9 ++ lib/gitlab/gitaly_client/operation_service.rb | 33 +++++ qa/qa/resource/group_base.rb | 16 ++ qa/qa/resource/user.rb | 17 ++- .../api/1_manage/bulk_import_group_spec.rb | 27 ++++ spec/factories/ci/runner_projects.rb | 9 +- spec/factories/ci/runners.rb | 14 +- .../components/issues_list_app_spec.js | 6 +- .../details_page/tags_list_row_spec.js | 18 ++- .../filtered_search_bar/mock_data.js | 57 +++++++- .../tokens/epic_token_spec.js | 97 ++++++------ .../contacts/create_spec.rb | 7 +- .../contacts/update_spec.rb | 75 ++++++++++ .../organizations/create_spec.rb | 5 +- .../organizations/update_spec.rb | 15 +- .../fix_first_mentioned_in_commit_at_spec.rb | 9 ++ .../gitaly_client/operation_service_spec.rb | 50 +++++++ spec/models/ci/runner_spec.rb | 4 +- .../clusters/applications/runner_spec.rb | 3 +- spec/requests/api/graphql/ci/runner_spec.rb | 2 +- .../contacts/update_service_spec.rb | 56 +++++++ .../support/database/cross-join-allowlist.yml | 5 +- .../prevent_cross_database_modification.rb | 13 +- 49 files changed, 761 insertions(+), 228 deletions(-) create mode 100644 app/assets/javascripts/vue_shared/components/filtered_search_bar/queries/epic.fragment.graphql create mode 100644 app/assets/javascripts/vue_shared/components/filtered_search_bar/queries/search_epics.query.graphql create mode 100644 app/graphql/mutations/customer_relations/contacts/update.rb create mode 100644 app/services/customer_relations/contacts/update_service.rb create mode 100644 config/feature_flags/development/gitaly_user_merge_branch_access_error.yml create mode 100644 spec/graphql/mutations/customer_relations/contacts/update_spec.rb create mode 100644 spec/services/customer_relations/contacts/update_service_spec.rb diff --git a/app/assets/javascripts/issues_list/components/issues_list_app.vue b/app/assets/javascripts/issues_list/components/issues_list_app.vue index de57cb93899..93d9d2808e6 100644 --- a/app/assets/javascripts/issues_list/components/issues_list_app.vue +++ b/app/assets/javascripts/issues_list/components/issues_list_app.vue @@ -122,7 +122,7 @@ export default { fullPath: { default: '', }, - groupEpicsPath: { + groupPath: { default: '', }, hasAnyIssues: { @@ -371,16 +371,18 @@ export default { }); } - if (this.groupEpicsPath) { + if (this.groupPath) { tokens.push({ type: TOKEN_TYPE_EPIC, title: TOKEN_TITLE_EPIC, icon: 'epic', token: EpicToken, unique: true, + symbol: '&', idProperty: 'id', useIdValue: true, - fetchEpics: this.fetchEpics, + recentSuggestionsStorageKey: `${this.fullPath}-issues-recent-tokens-epic_id`, + fullPath: this.groupPath, }); } @@ -450,16 +452,6 @@ export default { fetchEmojis(search) { return this.fetchWithCache(this.autocompleteAwardEmojisPath, 'emojis', 'name', search); }, - async fetchEpics({ search }) { - const epics = await this.fetchWithCache(this.groupEpicsPath, 'epics'); - if (!search) { - return epics.slice(0, MAX_LIST_SIZE); - } - const number = Number(search); - return Number.isNaN(number) - ? fuzzaldrinPlus.filter(epics, search, { key: 'title' }) - : epics.filter((epic) => epic.id === number); - }, fetchLabels(search) { return this.$apollo .query({ diff --git a/app/assets/javascripts/issues_list/index.js b/app/assets/javascripts/issues_list/index.js index 62180c7ffa4..47af20f5271 100644 --- a/app/assets/javascripts/issues_list/index.js +++ b/app/assets/javascripts/issues_list/index.js @@ -119,7 +119,7 @@ export function mountIssuesListApp() { emptyStateSvgPath, exportCsvPath, fullPath, - groupEpicsPath, + groupPath, hasAnyIssues, hasAnyProjects, hasBlockedIssuesFeature, @@ -152,7 +152,7 @@ export function mountIssuesListApp() { canBulkUpdate: parseBoolean(canBulkUpdate), emptyStateSvgPath, fullPath, - groupEpicsPath, + groupPath, hasAnyIssues: parseBoolean(hasAnyIssues), hasAnyProjects: parseBoolean(hasAnyProjects), hasBlockedIssuesFeature: parseBoolean(hasBlockedIssuesFeature), diff --git a/app/assets/javascripts/registry/explorer/components/details_page/tags_list_row.vue b/app/assets/javascripts/registry/explorer/components/details_page/tags_list_row.vue index 81546151acf..0556fd298aa 100644 --- a/app/assets/javascripts/registry/explorer/components/details_page/tags_list_row.vue +++ b/app/assets/javascripts/registry/explorer/components/details_page/tags_list_row.vue @@ -181,13 +181,14 @@ export default {