Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-04 09:11:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-04 09:11:24 +0300
commitbf3e636cc03f219a8411cdd723a364a08c8502b1 (patch)
treec6c2b8e8fb1f14651c8e8eee58bbb44cb59b6d58
parent982880576eb35b48caf6791687d4f023136cca25 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.rubocop_todo/layout/hash_alignment.yml2
-rw-r--r--.rubocop_todo/layout/line_length.yml1
-rw-r--r--app/assets/javascripts/batch_comments/components/submit_dropdown.vue24
-rw-r--r--app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue4
-rw-r--r--app/assets/javascripts/work_items/components/work_item_links/work_item_links_form.vue6
-rw-r--r--app/assets/javascripts/work_items/graphql/work_item_links.query.graphql1
-rw-r--r--app/models/integrations/harbor.rb2
-rw-r--r--app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml2
-rw-r--r--doc/development/deprecation_guidelines/index.md6
-rw-r--r--locale/gitlab.pot2
-rw-r--r--spec/frontend/work_items/components/work_item_links/work_item_links_form_spec.js44
-rw-r--r--spec/frontend/work_items/mock_data.js3
12 files changed, 77 insertions, 20 deletions
diff --git a/.rubocop_todo/layout/hash_alignment.yml b/.rubocop_todo/layout/hash_alignment.yml
index 86787288f74..003afae5e76 100644
--- a/.rubocop_todo/layout/hash_alignment.yml
+++ b/.rubocop_todo/layout/hash_alignment.yml
@@ -39,8 +39,6 @@ Layout/HashAlignment:
- 'app/models/user_status.rb'
- 'app/models/wiki.rb'
- 'app/models/work_items/type.rb'
- - 'ee/app/controllers/ee/search_controller.rb'
- - 'ee/app/controllers/projects/integrations/zentao/issues_controller.rb'
- 'ee/app/graphql/mutations/iterations/cadences/create.rb'
- 'ee/app/graphql/mutations/iterations/cadences/destroy.rb'
- 'ee/app/graphql/mutations/iterations/cadences/update.rb'
diff --git a/.rubocop_todo/layout/line_length.yml b/.rubocop_todo/layout/line_length.yml
index 085897911ea..031ea8c5f76 100644
--- a/.rubocop_todo/layout/line_length.yml
+++ b/.rubocop_todo/layout/line_length.yml
@@ -1137,7 +1137,6 @@ Layout/LineLength:
- 'ee/app/controllers/ee/repositories/git_http_client_controller.rb'
- 'ee/app/controllers/ee/repositories/git_http_controller.rb'
- 'ee/app/controllers/ee/repositories/lfs_api_controller.rb'
- - 'ee/app/controllers/ee/search_controller.rb'
- 'ee/app/controllers/ee/sessions_controller.rb'
- 'ee/app/controllers/groups/analytics/cycle_analytics/stages_controller.rb'
- 'ee/app/controllers/groups/analytics/cycle_analytics/summary_controller.rb'
diff --git a/app/assets/javascripts/batch_comments/components/submit_dropdown.vue b/app/assets/javascripts/batch_comments/components/submit_dropdown.vue
index e48f84cae56..7ed77426a5e 100644
--- a/app/assets/javascripts/batch_comments/components/submit_dropdown.vue
+++ b/app/assets/javascripts/batch_comments/components/submit_dropdown.vue
@@ -1,10 +1,11 @@
<script>
import $ from 'jquery';
-import { GlDropdown, GlButton, GlIcon, GlForm, GlFormGroup } from '@gitlab/ui';
+import { GlDropdown, GlButton, GlIcon, GlForm, GlFormGroup, GlLink } from '@gitlab/ui';
import { mapGetters, mapActions } from 'vuex';
import MarkdownField from '~/vue_shared/components/markdown/field.vue';
import { scrollToElement } from '~/lib/utils/common_utils';
import Autosave from '~/autosave';
+import { helpPagePath } from '~/helpers/help_page_helper';
export default {
components: {
@@ -13,6 +14,7 @@ export default {
GlIcon,
GlForm,
GlFormGroup,
+ GlLink,
MarkdownField,
},
data() {
@@ -69,6 +71,9 @@ export default {
},
},
restrictedToolbarItems: ['full-screen'],
+ helpPagePath: helpPagePath('user/project/merge_requests/reviews/index.html', {
+ anchor: 'submit-a-review',
+ }),
};
</script>
@@ -86,11 +91,18 @@ export default {
<gl-icon class="dropdown-chevron" name="chevron-up" />
</template>
<gl-form data-testid="submit-gl-form" @submit.prevent="submitReview">
- <gl-form-group
- :label="__('Summary comment (optional)')"
- label-for="review-note-body"
- label-class="gl-mb-2"
- >
+ <gl-form-group label-for="review-note-body" label-class="gl-mb-2">
+ <template #label>
+ {{ __('Summary comment (optional)') }}
+ <gl-link
+ :href="$options.helpPagePath"
+ :aria-label="__('More information')"
+ target="_blank"
+ class="gl-ml-2"
+ >
+ <gl-icon name="question-o" />
+ </gl-link>
+ </template>
<div class="common-note-form gfm-form">
<div
class="comment-warning-wrapper gl-border-solid gl-border-1 gl-rounded-base gl-border-gray-100"
diff --git a/app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue b/app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue
index 6a43fdb541f..8aa1c862055 100644
--- a/app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue
+++ b/app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue
@@ -43,7 +43,6 @@ export default {
};
},
update(data) {
- this.canUpdate = data.workItem.userPermissions.updateWorkItem;
return (
data.workItem.widgets.find((widget) => widget.type === WIDGET_TYPE_HIERARCHY)?.children
.nodes ?? []
@@ -54,6 +53,7 @@ export default {
},
result({ data }) {
this.canUpdate = data.workItem.userPermissions.updateWorkItem;
+ this.confidential = data.workItem.confidential;
},
},
},
@@ -63,6 +63,7 @@ export default {
isOpen: true,
children: [],
canUpdate: false,
+ confidential: false,
};
},
computed: {
@@ -164,6 +165,7 @@ export default {
data-testid="add-links-form"
:issuable-gid="issuableGid"
:children-ids="childrenIds"
+ :parent-confidential="confidential"
@cancel="hideAddForm"
@addWorkItemChild="addChild"
/>
diff --git a/app/assets/javascripts/work_items/components/work_item_links/work_item_links_form.vue b/app/assets/javascripts/work_items/components/work_item_links/work_item_links_form.vue
index d01d59050e6..707baf81d29 100644
--- a/app/assets/javascripts/work_items/components/work_item_links/work_item_links_form.vue
+++ b/app/assets/javascripts/work_items/components/work_item_links/work_item_links_form.vue
@@ -28,6 +28,11 @@ export default {
required: false,
default: () => [],
},
+ parentConfidential: {
+ type: Boolean,
+ required: false,
+ default: false,
+ },
},
apollo: {
availableWorkItems: {
@@ -123,6 +128,7 @@ export default {
hierarchyWidget: {
parentId: this.issuableGid,
},
+ confidential: this.parentConfidential,
},
},
})
diff --git a/app/assets/javascripts/work_items/graphql/work_item_links.query.graphql b/app/assets/javascripts/work_items/graphql/work_item_links.query.graphql
index 921f75ccb0a..827976551e0 100644
--- a/app/assets/javascripts/work_items/graphql/work_item_links.query.graphql
+++ b/app/assets/javascripts/work_items/graphql/work_item_links.query.graphql
@@ -8,6 +8,7 @@ query workItemQuery($id: WorkItemID!) {
userPermissions {
updateWorkItem
}
+ confidential
widgets {
type
... on WorkItemWidgetHierarchy {
diff --git a/app/models/integrations/harbor.rb b/app/models/integrations/harbor.rb
index 33f0b18f4d3..03913a71d47 100644
--- a/app/models/integrations/harbor.rb
+++ b/app/models/integrations/harbor.rb
@@ -21,7 +21,7 @@ module Integrations
end
def help
- s_("HarborIntegration|After the Harbor integration is activated, global variables ‘$HARBOR_USERNAME’, ‘$HARBOR_HOST’, ‘$HARBOR_OCI’, ‘$HARBOR_PASSWORD’, ‘$HARBOR_URL’ and ‘$HARBOR_PROJECT’ will be created for CI/CD use.")
+ s_("HarborIntegration|After the Harbor integration is activated, global variables '$HARBOR_USERNAME', '$HARBOR_HOST', '$HARBOR_OCI', '$HARBOR_PASSWORD', '$HARBOR_URL' and '$HARBOR_PROJECT' will be created for CI/CD use.")
end
class << self
diff --git a/app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml b/app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml
index 3e0a8a4f88b..88da252f2bb 100644
--- a/app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml
+++ b/app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml
@@ -2,7 +2,7 @@
- help_path = local_assigns.fetch(:help_path)
- label = local_assigns.fetch(:label)
- last = local_assigns.fetch(:last, false)
-- classes = ["btn btn-confirm gl-button btn-confirm-secondary gl-flex-direction-column gl-flex-basis-0 gl-flex-grow-1 gl-min-w-0"]
+- classes = ["btn btn-confirm gl-button btn-confirm-secondary gl-flex-direction-column gl-flex-basis-third "]
- conditional_classes = [("gl-mr-5" unless last)]
= link_to help_path, class: classes + conditional_classes do
diff --git a/doc/development/deprecation_guidelines/index.md b/doc/development/deprecation_guidelines/index.md
index dac10446b38..35dd7049acc 100644
--- a/doc/development/deprecation_guidelines/index.md
+++ b/doc/development/deprecation_guidelines/index.md
@@ -4,10 +4,10 @@ group: unassigned
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
-# Deprecation guidelines
+# Deprecating GitLab features
-This page includes information about how and when to remove or make [breaking
-changes](../contributing/index.md#breaking-changes) to GitLab features.
+This page includes information about how and when to remove or make
+[breaking changes](../contributing/index.md#breaking-changes) to GitLab features.
## Terminology
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index b3ce6c480d2..a8968115161 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -19064,7 +19064,7 @@ msgstr ""
msgid "Harbor Registry"
msgstr ""
-msgid "HarborIntegration|After the Harbor integration is activated, global variables ‘$HARBOR_USERNAME’, ‘$HARBOR_HOST’, ‘$HARBOR_OCI’, ‘$HARBOR_PASSWORD’, ‘$HARBOR_URL’ and ‘$HARBOR_PROJECT’ will be created for CI/CD use."
+msgid "HarborIntegration|After the Harbor integration is activated, global variables '$HARBOR_USERNAME', '$HARBOR_HOST', '$HARBOR_OCI', '$HARBOR_PASSWORD', '$HARBOR_URL' and '$HARBOR_PROJECT' will be created for CI/CD use."
msgstr ""
msgid "HarborIntegration|Base URL of the Harbor instance."
diff --git a/spec/frontend/work_items/components/work_item_links/work_item_links_form_spec.js b/spec/frontend/work_items/components/work_item_links/work_item_links_form_spec.js
index 56c1d8054fd..ce927a41d74 100644
--- a/spec/frontend/work_items/components/work_item_links/work_item_links_form_spec.js
+++ b/spec/frontend/work_items/components/work_item_links/work_item_links_form_spec.js
@@ -5,6 +5,7 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises';
import WorkItemLinksForm from '~/work_items/components/work_item_links/work_item_links_form.vue';
+import { WORK_ITEM_TYPE_IDS } from '~/work_items/constants';
import projectWorkItemsQuery from '~/work_items/graphql/project_work_items.query.graphql';
import createWorkItemMutation from '~/work_items/graphql/create_work_item.mutation.graphql';
import updateWorkItemMutation from '~/work_items/graphql/update_work_item.mutation.graphql';
@@ -22,14 +23,17 @@ describe('WorkItemLinksForm', () => {
const updateMutationResolver = jest.fn().mockResolvedValue(updateWorkItemMutationResponse);
const createMutationResolver = jest.fn().mockResolvedValue(createWorkItemMutationResponse);
- const createComponent = async ({ listResponse = availableWorkItemsResponse } = {}) => {
+ const createComponent = async ({
+ listResponse = availableWorkItemsResponse,
+ parentConfidential = false,
+ } = {}) => {
wrapper = shallowMountExtended(WorkItemLinksForm, {
apolloProvider: createMockApollo([
[projectWorkItemsQuery, jest.fn().mockResolvedValue(listResponse)],
[updateWorkItemMutation, updateMutationResolver],
[createWorkItemMutation, createMutationResolver],
]),
- propsData: { issuableGid: 'gid://gitlab/WorkItem/1' },
+ propsData: { issuableGid: 'gid://gitlab/WorkItem/1', parentConfidential },
provide: {
projectPath: 'project/path',
},
@@ -55,14 +59,46 @@ describe('WorkItemLinksForm', () => {
expect(findForm().exists()).toBe(true);
});
- it('creates child task', async () => {
+ it('creates child task in non confidential parent', async () => {
findInput().vm.$emit('input', 'Create task test');
findForm().vm.$emit('submit', {
preventDefault: jest.fn(),
});
await waitForPromises();
- expect(createMutationResolver).toHaveBeenCalled();
+ expect(createMutationResolver).toHaveBeenCalledWith({
+ input: {
+ title: 'Create task test',
+ projectPath: 'project/path',
+ workItemTypeId: WORK_ITEM_TYPE_IDS.TASK,
+ hierarchyWidget: {
+ parentId: 'gid://gitlab/WorkItem/1',
+ },
+ confidential: false,
+ },
+ });
+ });
+
+ it('creates child task in confidential parent', async () => {
+ await createComponent({ parentConfidential: true });
+
+ findInput().vm.$emit('input', 'Create confidential task');
+
+ findForm().vm.$emit('submit', {
+ preventDefault: jest.fn(),
+ });
+ await waitForPromises();
+ expect(createMutationResolver).toHaveBeenCalledWith({
+ input: {
+ title: 'Create confidential task',
+ projectPath: 'project/path',
+ workItemTypeId: WORK_ITEM_TYPE_IDS.TASK,
+ hierarchyWidget: {
+ parentId: 'gid://gitlab/WorkItem/1',
+ },
+ confidential: true,
+ },
+ });
});
// Follow up issue to turn this functionality back on https://gitlab.com/gitlab-org/gitlab/-/issues/368757
diff --git a/spec/frontend/work_items/mock_data.js b/spec/frontend/work_items/mock_data.js
index 05ca66d2523..46aaf480564 100644
--- a/spec/frontend/work_items/mock_data.js
+++ b/spec/frontend/work_items/mock_data.js
@@ -337,6 +337,7 @@ export const workItemHierarchyEmptyResponse = {
userPermissions: {
updateWorkItem: false,
},
+ confidential: false,
widgets: [
{
type: 'DESCRIPTION',
@@ -369,6 +370,7 @@ export const workItemHierarchyNoUpdatePermissionResponse = {
userPermissions: {
updateWorkItem: false,
},
+ confidential: false,
widgets: [
{
type: 'DESCRIPTION',
@@ -412,6 +414,7 @@ export const workItemHierarchyResponse = {
userPermissions: {
updateWorkItem: true,
},
+ confidential: false,
widgets: [
{
type: 'DESCRIPTION',