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: {
noteable_type: this.noteableType,
noteable_id: this.getNoteableData.id,
// Internal notes were identified as `confidential`
// 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,
internal: this.noteIsInternal,
note: this.note,
},
merge_request_diff_head_sha: this.getNoteableData.diff_head_sha,

View File

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

View File

@ -136,7 +136,7 @@ export default {
);
},
textareaPlaceholder() {
return this.discussionNote?.confidential
return this.discussionNote?.internal
? this.$options.i18n.bodyPlaceholderInternal
: 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">
<comment-field-layout
:noteable-data="getNoteableData"
:is-internal-note="discussion.confidential"
:is-internal-note="discussion.internal"
>
<markdown-field
:markdown-preview-path="markdownPreviewPath"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
module QA
module Flow
module UserOnboarding
module_function
extend self
def onboard_user
Page::Registration::Welcome.perform do |welcome_page|
@ -17,3 +17,5 @@ module QA
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}
${false}
`('when checkbox value is `$shouldCheckboxBeChecked`', ({ shouldCheckboxBeChecked }) => {
it(`sets \`confidential\` to \`${shouldCheckboxBeChecked}\``, async () => {
it(`sets \`internal\` to \`${shouldCheckboxBeChecked}\``, async () => {
mountComponent({
mountFunction: mount,
initialData: { note: 'confidential note' },
initialData: { note: 'internal note' },
noteableData: { ...notableDataMockCanUpdateIssuable },
});
@ -606,7 +606,7 @@ describe('issue_comment_form component', () => {
findCommentButton().trigger('click');
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`
confidential | buttonText
${false} | ${'Save comment'}
${true} | ${'Save internal note'}
`('renders save button with text "$buttonText"', ({ confidential, buttonText }) => {
wrapper = createComponent({ props: { note: { ...note, confidential }, isEditing: true } });
internal | buttonText
${false} | ${'Save comment'}
${true} | ${'Save internal note'}
`('renders save button with text "$buttonText"', ({ internal, buttonText }) => {
wrapper = createComponent({ props: { note: { ...note, internal }, isEditing: true } });
expect(wrapper.findComponent(NoteForm).props('saveButtonTitle')).toBe(buttonText);
});

View File

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

View File

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

View File

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