Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2022-09-02 06:12:27 +00:00
parent 60f4785187
commit 326e1de67f
25 changed files with 88 additions and 43 deletions

View File

@ -214,11 +214,7 @@ export default {
note: { note: {
noteable_type: this.noteableType, noteable_type: this.noteableType,
noteable_id: this.getNoteableData.id, noteable_id: this.getNoteableData.id,
// Internal notes were identified as `confidential` internal: this.noteIsInternal,
// before we decided to treat them as _internal_
// so now until API is updated we need to use `confidential`
// in request payload.
confidential: this.noteIsInternal,
note: this.note, note: this.note,
}, },
merge_request_diff_head_sha: this.getNoteableData.diff_head_sha, merge_request_diff_head_sha: this.getNoteableData.diff_head_sha,

View File

@ -71,7 +71,7 @@ export default {
return this.note.note; return this.note.note;
}, },
saveButtonTitle() { saveButtonTitle() {
return this.note.confidential ? __('Save internal note') : __('Save comment'); return this.note.internal ? __('Save internal note') : __('Save comment');
}, },
hasSuggestion() { hasSuggestion() {
return this.note.suggestions && this.note.suggestions.length; return this.note.suggestions && this.note.suggestions.length;

View File

@ -136,7 +136,7 @@ export default {
); );
}, },
textareaPlaceholder() { textareaPlaceholder() {
return this.discussionNote?.confidential return this.discussionNote?.internal
? this.$options.i18n.bodyPlaceholderInternal ? this.$options.i18n.bodyPlaceholderInternal
: this.$options.i18n.bodyPlaceholder; : this.$options.i18n.bodyPlaceholder;
}, },
@ -331,7 +331,7 @@ export default {
<form :data-line-code="lineCode" class="edit-note common-note-form js-quick-submit gfm-form"> <form :data-line-code="lineCode" class="edit-note common-note-form js-quick-submit gfm-form">
<comment-field-layout <comment-field-layout
:noteable-data="getNoteableData" :noteable-data="getNoteableData"
:is-internal-note="discussion.confidential" :is-internal-note="discussion.internal"
> >
<markdown-field <markdown-field
:markdown-preview-path="markdownPreviewPath" :markdown-preview-path="markdownPreviewPath"

View File

@ -96,7 +96,7 @@ export default {
return isLoggedIn(); return isLoggedIn();
}, },
commentType() { commentType() {
return this.discussion.confidential ? __('internal note') : __('comment'); return this.discussion.internal ? __('internal note') : __('comment');
}, },
autosaveKey() { autosaveKey() {
return getDiscussionReplyKey(this.firstNote.noteable_type, this.discussion.id); return getDiscussionReplyKey(this.firstNote.noteable_type, this.discussion.id);
@ -108,7 +108,7 @@ export default {
return this.discussion.notes.slice(0, 1)[0]; return this.discussion.notes.slice(0, 1)[0];
}, },
saveButtonTitle() { saveButtonTitle() {
return this.discussion.confidential ? __('Reply internally') : __('Reply'); return this.discussion.internal ? __('Reply internally') : __('Reply');
}, },
shouldShowJumpToNextDiscussion() { shouldShowJumpToNextDiscussion() {
return this.showJumpToNextDiscussion(this.discussionsByDiffOrder ? 'diff' : 'discussion'); return this.showJumpToNextDiscussion(this.discussionsByDiffOrder ? 'diff' : 'discussion');

View File

@ -109,7 +109,7 @@ export default {
return this.note.author; return this.note.author;
}, },
commentType() { commentType() {
return this.note.confidential ? __('internal note') : __('comment'); return this.note.internal ? __('internal note') : __('comment');
}, },
classNameBindings() { classNameBindings() {
return { return {
@ -259,7 +259,7 @@ export default {
}); });
const confirmed = await confirmAction(msg, { const confirmed = await confirmAction(msg, {
primaryBtnVariant: 'danger', primaryBtnVariant: 'danger',
primaryBtnText: this.note.confidential ? __('Delete internal note') : __('Delete comment'), primaryBtnText: this.note.internal ? __('Delete internal note') : __('Delete comment'),
}); });
if (confirmed) { if (confirmed) {
@ -406,7 +406,7 @@ export default {
<template> <template>
<timeline-entry-item <timeline-entry-item
:id="noteAnchorId" :id="noteAnchorId"
:class="{ ...classNameBindings, 'internal-note': note.confidential }" :class="{ ...classNameBindings, 'internal-note': note.internal }"
:data-award-url="note.toggle_award_path" :data-award-url="note.toggle_award_path"
:data-note-id="note.id" :data-note-id="note.id"
class="note note-wrapper" class="note note-wrapper"
@ -459,7 +459,7 @@ export default {
:author="author" :author="author"
:created-at="note.created_at" :created-at="note.created_at"
:note-id="note.id" :note-id="note.id"
:is-internal-note="note.confidential" :is-internal-note="note.internal"
:noteable-type="noteableType" :noteable-type="noteableType"
> >
<template #note-header-info> <template #note-header-info>

View File

@ -0,0 +1,16 @@
# frozen_string_literal: true
class AddIndexOnIssueHealthStatus < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
TABLE_NAME = :issues
INDEX_NAME = 'index_issues_on_project_id_health_status_created_at_id'
def up
add_concurrent_index TABLE_NAME, [:project_id, :health_status, :created_at, :id], name: INDEX_NAME
end
def down
remove_concurrent_index TABLE_NAME, [:project_id, :health_status, :created_at, :id], name: INDEX_NAME
end
end

View File

@ -0,0 +1 @@
a1bca159b3ea6abbe3f3178bb1106b3b1886de74dfcdf0a41ec8a48ac6bd421a

View File

@ -28972,6 +28972,8 @@ CREATE INDEX index_issues_on_project_id_closed_at_desc_state_id_and_id ON issues
CREATE INDEX index_issues_on_project_id_closed_at_state_id_and_id ON issues USING btree (project_id, closed_at, state_id, id); CREATE INDEX index_issues_on_project_id_closed_at_state_id_and_id ON issues USING btree (project_id, closed_at, state_id, id);
CREATE INDEX index_issues_on_project_id_health_status_created_at_id ON issues USING btree (project_id, health_status, created_at, id);
CREATE INDEX index_issues_on_promoted_to_epic_id ON issues USING btree (promoted_to_epic_id) WHERE (promoted_to_epic_id IS NOT NULL); CREATE INDEX index_issues_on_promoted_to_epic_id ON issues USING btree (promoted_to_epic_id) WHERE (promoted_to_epic_id IS NOT NULL);
CREATE INDEX index_issues_on_sprint_id ON issues USING btree (sprint_id); CREATE INDEX index_issues_on_sprint_id ON issues USING btree (sprint_id);

View File

@ -12640,6 +12640,7 @@ four standard [pagination arguments](#connection-pagination-arguments):
| <a id="groupissuescrmcontactid"></a>`crmContactId` | [`String`](#string) | ID of a contact assigned to the issues. | | <a id="groupissuescrmcontactid"></a>`crmContactId` | [`String`](#string) | ID of a contact assigned to the issues. |
| <a id="groupissuescrmorganizationid"></a>`crmOrganizationId` | [`String`](#string) | ID of an organization assigned to the issues. | | <a id="groupissuescrmorganizationid"></a>`crmOrganizationId` | [`String`](#string) | ID of an organization assigned to the issues. |
| <a id="groupissuesepicid"></a>`epicId` | [`String`](#string) | ID of an epic associated with the issues, "none" and "any" values are supported. | | <a id="groupissuesepicid"></a>`epicId` | [`String`](#string) | ID of an epic associated with the issues, "none" and "any" values are supported. |
| <a id="groupissueshealthstatus"></a>`healthStatus` | [`HealthStatus`](#healthstatus) | Health status of the issue. |
| <a id="groupissuesiid"></a>`iid` | [`String`](#string) | IID of the issue. For example, "1". | | <a id="groupissuesiid"></a>`iid` | [`String`](#string) | IID of the issue. For example, "1". |
| <a id="groupissuesiids"></a>`iids` | [`[String!]`](#string) | List of IIDs of issues. For example, `["1", "2"]`. | | <a id="groupissuesiids"></a>`iids` | [`[String!]`](#string) | List of IIDs of issues. For example, `["1", "2"]`. |
| <a id="groupissuesin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. | | <a id="groupissuesin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. |
@ -16152,6 +16153,7 @@ Returns [`Issue`](#issue).
| <a id="projectissuecrmcontactid"></a>`crmContactId` | [`String`](#string) | ID of a contact assigned to the issues. | | <a id="projectissuecrmcontactid"></a>`crmContactId` | [`String`](#string) | ID of a contact assigned to the issues. |
| <a id="projectissuecrmorganizationid"></a>`crmOrganizationId` | [`String`](#string) | ID of an organization assigned to the issues. | | <a id="projectissuecrmorganizationid"></a>`crmOrganizationId` | [`String`](#string) | ID of an organization assigned to the issues. |
| <a id="projectissueepicid"></a>`epicId` | [`String`](#string) | ID of an epic associated with the issues, "none" and "any" values are supported. | | <a id="projectissueepicid"></a>`epicId` | [`String`](#string) | ID of an epic associated with the issues, "none" and "any" values are supported. |
| <a id="projectissuehealthstatus"></a>`healthStatus` | [`HealthStatus`](#healthstatus) | Health status of the issue. |
| <a id="projectissueiid"></a>`iid` | [`String`](#string) | IID of the issue. For example, "1". | | <a id="projectissueiid"></a>`iid` | [`String`](#string) | IID of the issue. For example, "1". |
| <a id="projectissueiids"></a>`iids` | [`[String!]`](#string) | List of IIDs of issues. For example, `["1", "2"]`. | | <a id="projectissueiids"></a>`iids` | [`[String!]`](#string) | List of IIDs of issues. For example, `["1", "2"]`. |
| <a id="projectissuein"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. | | <a id="projectissuein"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. |
@ -16235,6 +16237,7 @@ four standard [pagination arguments](#connection-pagination-arguments):
| <a id="projectissuescrmcontactid"></a>`crmContactId` | [`String`](#string) | ID of a contact assigned to the issues. | | <a id="projectissuescrmcontactid"></a>`crmContactId` | [`String`](#string) | ID of a contact assigned to the issues. |
| <a id="projectissuescrmorganizationid"></a>`crmOrganizationId` | [`String`](#string) | ID of an organization assigned to the issues. | | <a id="projectissuescrmorganizationid"></a>`crmOrganizationId` | [`String`](#string) | ID of an organization assigned to the issues. |
| <a id="projectissuesepicid"></a>`epicId` | [`String`](#string) | ID of an epic associated with the issues, "none" and "any" values are supported. | | <a id="projectissuesepicid"></a>`epicId` | [`String`](#string) | ID of an epic associated with the issues, "none" and "any" values are supported. |
| <a id="projectissueshealthstatus"></a>`healthStatus` | [`HealthStatus`](#healthstatus) | Health status of the issue. |
| <a id="projectissuesiid"></a>`iid` | [`String`](#string) | IID of the issue. For example, "1". | | <a id="projectissuesiid"></a>`iid` | [`String`](#string) | IID of the issue. For example, "1". |
| <a id="projectissuesiids"></a>`iids` | [`[String!]`](#string) | List of IIDs of issues. For example, `["1", "2"]`. | | <a id="projectissuesiids"></a>`iids` | [`[String!]`](#string) | List of IIDs of issues. For example, `["1", "2"]`. |
| <a id="projectissuesin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. | | <a id="projectissuesin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. |

View File

@ -12127,13 +12127,13 @@ msgstr ""
msgid "DastProfiles|You cannot run an active scan against an unvalidated site." msgid "DastProfiles|You cannot run an active scan against an unvalidated site."
msgstr "" msgstr ""
msgid "DastProfiles|folder/dast_example.har or https://example.com/dast_example.har" msgid "DastProfiles|https://example.com/dast_example.har"
msgstr "" msgstr ""
msgid "DastProfiles|folder/example.postman_collection.json or https://example.com/" msgid "DastProfiles|https://example.com/openapi.json"
msgstr "" msgstr ""
msgid "DastProfiles|folder/openapi.json or https://example.com/openapi.json" msgid "DastProfiles|https://example.com/postman_collection.json"
msgstr "" msgstr ""
msgid "DastSiteValidation|Copy HTTP header to clipboard" msgid "DastSiteValidation|Copy HTTP header to clipboard"
@ -19168,6 +19168,9 @@ msgstr ""
msgid "HAR (HTTP Archive)" msgid "HAR (HTTP Archive)"
msgstr "" msgstr ""
msgid "HAR file URL"
msgstr ""
msgid "HAR file path or URL" msgid "HAR file path or URL"
msgstr "" msgstr ""
@ -27589,6 +27592,9 @@ msgstr ""
msgid "OpenAPI" msgid "OpenAPI"
msgstr "" msgstr ""
msgid "OpenAPI Specification file URL"
msgstr ""
msgid "OpenAPI Specification file path or URL" msgid "OpenAPI Specification file path or URL"
msgstr "" msgstr ""
@ -29701,6 +29707,9 @@ msgstr ""
msgid "Postman collection" msgid "Postman collection"
msgstr "" msgstr ""
msgid "Postman collection file URL"
msgstr ""
msgid "Postman collection file path or URL" msgid "Postman collection file path or URL"
msgstr "" msgstr ""

View File

@ -3,7 +3,7 @@
module QA module QA
module Flow module Flow
module Login module Login
module_function extend self
def while_signed_in(as: nil, address: :gitlab, admin: false) def while_signed_in(as: nil, address: :gitlab, admin: false)
sign_in(as: as, address: address, admin: admin) sign_in(as: as, address: address, admin: admin)
@ -52,3 +52,5 @@ module QA
end end
end end
end end
QA::Flow::Login.prepend_mod_with('Flow::Login', namespace: QA)

View File

@ -3,7 +3,7 @@
module QA module QA
module Flow module Flow
module MergeRequest module MergeRequest
module_function extend self
def enable_merge_trains def enable_merge_trains
Page::Project::Menu.perform(&:go_to_general_settings) Page::Project::Menu.perform(&:go_to_general_settings)
@ -33,3 +33,5 @@ module QA
end end
end end
end end
QA::Flow::MergeRequest.prepend_mod_with('Flow::MergeRequest', namespace: QA)

View File

@ -3,7 +3,7 @@
module QA module QA
module Flow module Flow
module Pipeline module Pipeline
module_function extend self
# Acceptable statuses: # Acceptable statuses:
# canceled, created, failed, manual, passed # canceled, created, failed, manual, passed
@ -27,3 +27,5 @@ module QA
end end
end end
end end
QA::Flow::Pipeline.prepend_mod_with('Flow::Pipeline', namespace: QA)

View File

@ -3,7 +3,7 @@
module QA module QA
module Flow module Flow
module Project module Project
module_function extend self
def go_to_create_project_from_template def go_to_create_project_from_template
Page::Project::New.perform(&:click_create_from_template_link) Page::Project::New.perform(&:click_create_from_template_link)
@ -11,3 +11,5 @@ module QA
end end
end end
end end
QA::Flow::Project.prepend_mod_with('Flow::Project', namespace: QA)

View File

@ -5,7 +5,7 @@ module QA
module Purchase module Purchase
include QA::Support::Helpers::Plan include QA::Support::Helpers::Plan
module_function extend self
def upgrade_subscription(plan: PREMIUM) def upgrade_subscription(plan: PREMIUM)
Page::Group::Menu.perform(&:go_to_billing) Page::Group::Menu.perform(&:go_to_billing)

View File

@ -3,7 +3,7 @@
module QA module QA
module Flow module Flow
module Saml module Saml
module_function extend self
def page def page
Capybara.current_session Capybara.current_session
@ -72,3 +72,5 @@ module QA
end end
end end
end end
QA::Flow::Saml.prepend_mod_with('Flow::Saml', namespace: QA)

View File

@ -3,7 +3,7 @@
module QA module QA
module Flow module Flow
module Settings module Settings
module_function extend self
def disable_snowplow def disable_snowplow
Flow::Login.while_signed_in_as_admin do Flow::Login.while_signed_in_as_admin do
@ -23,3 +23,5 @@ module QA
end end
end end
end end
QA::Flow::Settings.prepend_mod_with('Flow::Settings', namespace: QA)

View File

@ -3,7 +3,7 @@
module QA module QA
module Flow module Flow
module SignUp module SignUp
module_function extend self
def page def page
Capybara.current_session Capybara.current_session
@ -55,3 +55,5 @@ module QA
end end
end end
end end
QA::Flow::SignUp.prepend_mod_with('Flow::SignUp', namespace: QA)

View File

@ -3,7 +3,7 @@
module QA module QA
module Flow module Flow
module User module User
module_function extend self
def page def page
Capybara.current_session Capybara.current_session
@ -24,3 +24,5 @@ module QA
end end
end end
end end
QA::Flow::User.prepend_mod_with('Flow::User', namespace: QA)

View File

@ -3,7 +3,7 @@
module QA module QA
module Flow module Flow
module UserOnboarding module UserOnboarding
module_function extend self
def onboard_user def onboard_user
Page::Registration::Welcome.perform do |welcome_page| Page::Registration::Welcome.perform do |welcome_page|
@ -17,3 +17,5 @@ module QA
end end
end end
end end
QA::Flow::UserOnboarding.prepend_mod_with('Flow::UserOnboarding', namespace: QA)

View File

@ -586,10 +586,10 @@ describe('issue_comment_form component', () => {
${true} ${true}
${false} ${false}
`('when checkbox value is `$shouldCheckboxBeChecked`', ({ shouldCheckboxBeChecked }) => { `('when checkbox value is `$shouldCheckboxBeChecked`', ({ shouldCheckboxBeChecked }) => {
it(`sets \`confidential\` to \`${shouldCheckboxBeChecked}\``, async () => { it(`sets \`internal\` to \`${shouldCheckboxBeChecked}\``, async () => {
mountComponent({ mountComponent({
mountFunction: mount, mountFunction: mount,
initialData: { note: 'confidential note' }, initialData: { note: 'internal note' },
noteableData: { ...notableDataMockCanUpdateIssuable }, noteableData: { ...notableDataMockCanUpdateIssuable },
}); });
@ -606,7 +606,7 @@ describe('issue_comment_form component', () => {
findCommentButton().trigger('click'); findCommentButton().trigger('click');
const [providedData] = wrapper.vm.saveNote.mock.calls[0]; const [providedData] = wrapper.vm.saveNote.mock.calls[0];
expect(providedData.data.note.confidential).toBe(shouldCheckboxBeChecked); expect(providedData.data.note.internal).toBe(shouldCheckboxBeChecked);
}); });
}); });

View File

@ -74,11 +74,11 @@ describe('issue_note_body component', () => {
}); });
it.each` it.each`
confidential | buttonText internal | buttonText
${false} | ${'Save comment'} ${false} | ${'Save comment'}
${true} | ${'Save internal note'} ${true} | ${'Save internal note'}
`('renders save button with text "$buttonText"', ({ confidential, buttonText }) => { `('renders save button with text "$buttonText"', ({ internal, buttonText }) => {
wrapper = createComponent({ props: { note: { ...note, confidential }, isEditing: true } }); wrapper = createComponent({ props: { note: { ...note, internal }, isEditing: true } });
expect(wrapper.findComponent(NoteForm).props('saveButtonTitle')).toBe(buttonText); expect(wrapper.findComponent(NoteForm).props('saveButtonTitle')).toBe(buttonText);
}); });

View File

@ -116,15 +116,15 @@ describe('issue_note_form component', () => {
}); });
it.each` it.each`
confidential | placeholder internal | placeholder
${false} | ${'Write a comment or drag your files here…'} ${false} | ${'Write a comment or drag your files here…'}
${true} | ${'Write an internal note or drag your files here…'} ${true} | ${'Write an internal note or drag your files here…'}
`( `(
'should set correct textarea placeholder text when discussion confidentiality is $confidential', 'should set correct textarea placeholder text when discussion confidentiality is $internal',
({ confidential, placeholder }) => { ({ internal, placeholder }) => {
props.note = { props.note = {
...note, ...note,
confidential, internal,
}; };
wrapper = createComponentWrapper(); wrapper = createComponentWrapper();

View File

@ -97,7 +97,7 @@ describe('noteable_discussion component', () => {
`( `(
'reply button on form should have title "$saveButtonTitle" when note is $noteType', 'reply button on form should have title "$saveButtonTitle" when note is $noteType',
async ({ isNoteInternal, saveButtonTitle }) => { async ({ isNoteInternal, saveButtonTitle }) => {
wrapper.setProps({ discussion: { ...discussionMock, confidential: isNoteInternal } }); wrapper.setProps({ discussion: { ...discussionMock, internal: isNoteInternal } });
await nextTick(); await nextTick();
const replyPlaceholder = wrapper.findComponent(ReplyPlaceholder); const replyPlaceholder = wrapper.findComponent(ReplyPlaceholder);

View File

@ -292,7 +292,7 @@ describe('issue_note', () => {
describe('internal note', () => { describe('internal note', () => {
it('has internal note class for internal notes', () => { it('has internal note class for internal notes', () => {
createWrapper({ note: { ...note, confidential: true } }); createWrapper({ note: { ...note, internal: true } });
expect(wrapper.classes()).toContain('internal-note'); expect(wrapper.classes()).toContain('internal-note');
}); });