Skip to content

Commit e18006f

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent cb8835f commit e18006f

File tree

83 files changed

+565
-565
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+565
-565
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ default:
5656
workflow:
5757
name: '$PIPELINE_NAME'
5858
rules:
59-
- if: '$CI_PROJECT_PATH == "gitlab-org/gitaly" && $CI_PIPELINE_SOURCE == "parent_pipeline" && $GITALY_TEST'
59+
- if: '$CI_PIPELINE_SOURCE == "pipeline" && $GITALY_TEST'
6060
variables:
6161
<<: *default-ruby-variables
6262
PIPELINE_NAME: 'Gitaly Rails Test Pipeline'

.gitlab/ci/rules.gitlab-ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,13 +1151,15 @@
11511151
when: never
11521152
# If any of the files that are DIRECTLY related to generating or managing the GLFM specification change,
11531153
# run `glfm-verify` to get quick feedback on any needed updates, even if the MR is not yet approved
1154+
- <<: *if-default-refs
11541155
- changes: *glfm-patterns
11551156
# Otherwise do not run `glfm-verify` if the MR is not approved
11561157
- <<: *if-merge-request-not-approved
11571158
when: never
11581159
# If we passed all the previous rules, run `glfm-verify` if there are any changes that could impact `glfm-verify`.
11591160
# This could potentially be a wide range of files, so we reuse `setup-test-env-patterns`, which includes
11601161
# almost all app files except docs files.
1162+
- <<: *if-default-refs
11611163
- changes: *setup-test-env-patterns
11621164
# If we are forcing all rspec to run, run this job too.
11631165
- <<: *if-merge-request-labels-run-all-rspec
@@ -1233,6 +1235,7 @@
12331235
.frontend:rules:compile-test-assets:
12341236
rules:
12351237
- if: '$ENABLE_COMPILE_TEST_ASSETS == "true"'
1238+
- if: '$ENABLE_RSPEC == "true"'
12361239
- <<: *if-merge-request-labels-run-all-rspec
12371240
- <<: *if-merge-request
12381241
changes: *backend-patterns

app/assets/javascripts/issues/show/components/description.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
sprintfWorkItem,
2121
I18N_WORK_ITEM_ERROR_CREATING,
2222
I18N_WORK_ITEM_ERROR_DELETING,
23-
TASK_TYPE_NAME,
23+
WORK_ITEM_TYPE_VALUE_TASK,
2424
} from '~/work_items/constants';
2525
import { renderGFM } from '~/behaviors/markdown/render_gfm';
2626
import eventHub from '../event_hub';
@@ -129,7 +129,7 @@ export default {
129129
},
130130
computed: {
131131
taskWorkItemTypeId() {
132-
return this.workItemTypes.find((type) => type.name === TASK_TYPE_NAME)?.id;
132+
return this.workItemTypes.find((type) => type.name === WORK_ITEM_TYPE_VALUE_TASK)?.id;
133133
},
134134
issueGid() {
135135
return this.issueId ? convertToGraphQLId(TYPENAME_WORK_ITEM, this.issueId) : null;

app/assets/javascripts/work_items/components/notes/work_item_comment_form.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ import { helpPagePath } from '~/helpers/help_page_helper';
44
import { s__, __ } from '~/locale';
55
import Tracking from '~/tracking';
66
import { capitalizeFirstCharacter } from '~/lib/utils/text_utility';
7-
import { STATE_OPEN, TRACKING_CATEGORY_SHOW, TASK_TYPE_NAME } from '~/work_items/constants';
7+
import {
8+
STATE_OPEN,
9+
TRACKING_CATEGORY_SHOW,
10+
WORK_ITEM_TYPE_VALUE_TASK,
11+
} from '~/work_items/constants';
812
import { getDraft, clearDraft, updateDraft } from '~/lib/utils/autosave';
913
import { confirmAction } from '~/lib/utils/confirm_via_gl_modal/confirm_via_gl_modal';
1014
import MarkdownEditor from '~/vue_shared/components/markdown/markdown_editor.vue';
@@ -127,10 +131,12 @@ export default {
127131
return this.isNoteInternal ? this.$options.i18n.addInternalNote : this.commentButtonText;
128132
},
129133
workItemDocPath() {
130-
return this.workItemType === TASK_TYPE_NAME ? 'user/tasks.html' : 'user/okrs.html';
134+
return this.workItemType === WORK_ITEM_TYPE_VALUE_TASK ? 'user/tasks.html' : 'user/okrs.html';
131135
},
132136
workItemDocAnchor() {
133-
return this.workItemType === TASK_TYPE_NAME ? 'confidential-tasks' : 'confidential-okrs';
137+
return this.workItemType === WORK_ITEM_TYPE_VALUE_TASK
138+
? 'confidential-tasks'
139+
: 'confidential-okrs';
134140
},
135141
getWorkItemData() {
136142
return {

app/assets/javascripts/work_items/components/notes/work_item_comment_locked.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { GlLink, GlIcon } from '@gitlab/ui';
33
import { __, sprintf } from '~/locale';
44
import { helpPagePath } from '~/helpers/help_page_helper';
5-
import { TASK_TYPE_NAME } from '~/work_items/constants';
5+
import { WORK_ITEM_TYPE_VALUE_TASK } from '~/work_items/constants';
66
77
export default {
88
components: {
@@ -13,7 +13,7 @@ export default {
1313
workItemType: {
1414
required: false,
1515
type: String,
16-
default: TASK_TYPE_NAME,
16+
default: WORK_ITEM_TYPE_VALUE_TASK,
1717
},
1818
isProjectArchived: {
1919
required: false,

app/assets/javascripts/work_items/components/shared/work_item_link_child_contents.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import RichTimestampTooltip from '~/vue_shared/components/rich_timestamp_tooltip
66
import WorkItemLinkChildMetadata from 'ee_else_ce/work_items/components/shared/work_item_link_child_metadata.vue';
77
import {
88
STATE_OPEN,
9-
TASK_TYPE_NAME,
109
WIDGET_TYPE_PROGRESS,
1110
WIDGET_TYPE_HIERARCHY,
1211
WIDGET_TYPE_HEALTH_STATUS,
1312
WIDGET_TYPE_MILESTONE,
1413
WIDGET_TYPE_ASSIGNEES,
1514
WIDGET_TYPE_LABELS,
1615
WORK_ITEM_NAME_TO_ICON_MAP,
16+
WORK_ITEM_TYPE_VALUE_TASK,
1717
} from '../../constants';
1818
1919
export default {
@@ -79,7 +79,7 @@ export default {
7979
return this.childItem.state === STATE_OPEN;
8080
},
8181
iconName() {
82-
if (this.childItemType === TASK_TYPE_NAME && !this.showTaskIcon) {
82+
if (this.childItemType === WORK_ITEM_TYPE_VALUE_TASK && !this.showTaskIcon) {
8383
return this.isChildItemOpen ? 'issue-open-m' : 'issue-close';
8484
}
8585
return WORK_ITEM_NAME_TO_ICON_MAP[this.childItemType];
@@ -88,7 +88,7 @@ export default {
8888
return this.childItem.workItemType.name;
8989
},
9090
iconClass() {
91-
if (this.childItemType === TASK_TYPE_NAME && !this.showTaskIcon) {
91+
if (this.childItemType === WORK_ITEM_TYPE_VALUE_TASK && !this.showTaskIcon) {
9292
return this.isChildItemOpen ? 'gl-text-green-500' : 'gl-text-blue-500';
9393
}
9494
return '';

app/assets/javascripts/work_items/components/work_item_links/work_item_link_child.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import { createAlert } from '~/alert';
88
import updateWorkItemMutation from '../../graphql/update_work_item.mutation.graphql';
99
import {
1010
STATE_OPEN,
11-
TASK_TYPE_NAME,
12-
WORK_ITEM_TYPE_VALUE_OBJECTIVE,
1311
WIDGET_TYPE_HIERARCHY,
1412
WORK_ITEM_NAME_TO_ICON_MAP,
13+
WORK_ITEM_TYPE_VALUE_OBJECTIVE,
14+
WORK_ITEM_TYPE_VALUE_TASK,
1515
} from '../../constants';
1616
import getWorkItemTreeQuery from '../../graphql/work_item_tree.query.graphql';
1717
import WorkItemLinkChildContents from '../shared/work_item_link_child_contents.vue';
@@ -76,13 +76,13 @@ export default {
7676
return this.childItem.workItemType.name;
7777
},
7878
iconName() {
79-
if (this.childItemType === TASK_TYPE_NAME) {
79+
if (this.childItemType === WORK_ITEM_TYPE_VALUE_TASK) {
8080
return this.isItemOpen ? 'issue-open-m' : 'issue-close';
8181
}
8282
return WORK_ITEM_NAME_TO_ICON_MAP[this.childItemType];
8383
},
8484
iconClass() {
85-
if (this.childItemType === TASK_TYPE_NAME) {
85+
if (this.childItemType === WORK_ITEM_TYPE_VALUE_TASK) {
8686
return this.isItemOpen ? 'gl-text-green-500' : 'gl-text-blue-500';
8787
}
8888
return '';

app/assets/javascripts/work_items/constants.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ export const STATE_EVENT_CLOSE = 'CLOSE';
1010

1111
export const TRACKING_CATEGORY_SHOW = 'workItems:show';
1212

13-
export const TASK_TYPE_NAME = 'Task';
14-
1513
export const WIDGET_TYPE_ASSIGNEES = 'ASSIGNEES';
1614
export const WIDGET_TYPE_DESCRIPTION = 'DESCRIPTION';
1715
export const WIDGET_TYPE_AWARD_EMOJI = 'AWARD_EMOJI';
@@ -46,9 +44,6 @@ export const WORK_ITEM_TYPE_VALUE_REQUIREMENTS = 'Requirements';
4644
export const WORK_ITEM_TYPE_VALUE_KEY_RESULT = 'Key Result';
4745
export const WORK_ITEM_TYPE_VALUE_OBJECTIVE = 'Objective';
4846

49-
export const NAMESPACE_GROUP = 'group';
50-
export const NAMESPACE_PROJECT = 'project';
51-
5247
export const WORK_ITEM_TITLE_MAX_LENGTH = 255;
5348

5449
export const i18n = {
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# frozen_string_literal: true
2+
3+
module Mutations
4+
module Notes
5+
module Create
6+
class Discussion < Base
7+
graphql_name 'CreateDiscussion'
8+
9+
private
10+
11+
def create_note_params(noteable, args)
12+
super(noteable, args).merge({ type: 'DiscussionNote' })
13+
end
14+
end
15+
end
16+
end
17+
end

app/graphql/mutations/work_items/create.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def ready?(**args)
6060
def resolve(project_path: nil, namespace_path: nil, **attributes)
6161
container_path = project_path || namespace_path
6262
container = authorized_find!(container_path)
63-
check_env_feature_available!(container)
6463
check_feature_available!(container)
6564

6665
params = global_id_compatibility_params(attributes).merge(author_id: current_user.id)
@@ -84,15 +83,6 @@ def resolve(project_path: nil, namespace_path: nil, **attributes)
8483

8584
private
8685

87-
# This is just a temporary measure while we migrate and backfill epic internal_ids
88-
# More info in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/139367
89-
def check_env_feature_available!(container)
90-
return unless container.is_a?(::Group) && Rails.env.production?
91-
92-
message = 'Group level work items are disabled. Only project paths allowed in `namespacePath`.'
93-
raise Gitlab::Graphql::Errors::ArgumentError, message
94-
end
95-
9686
def check_feature_available!(container)
9787
return unless container.is_a?(::Group) && Feature.disabled?(:namespace_level_work_items, container)
9888

0 commit comments

Comments
 (0)