From 3ce7340b2ae954b6b449bfba5720fa356b803c51 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 20 Oct 2021 12:13:26 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .../javascripts/cycle_analytics/constants.js | 5 + .../diffs/components/diff_comment_cell.vue | 6 + .../diffs/components/diff_line_note_form.vue | 18 ++- .../diffs/components/diff_view.vue | 15 +- .../javascripts/diffs/utils/diff_line.js | 10 ++ .../shared/commit_message_field.vue | 137 ++++++++++++++++ .../issues_list/service_desk_helper.js | 2 +- .../components/multiline_comment_form.vue | 6 +- .../notes/components/note_form.vue | 2 +- app/assets/stylesheets/startup/_cloaking.scss | 2 + app/assets/stylesheets/utilities.scss | 9 ++ .../application_setting_implementation.rb | 3 + .../layouts/nav/_top_nav_responsive.html.haml | 3 +- .../_service_desk_empty_state.html.haml | 2 +- ..._user_toggled_task_item_status_monthly.yml | 1 + ..._i_code_review_user_approve_mr_monthly.yml | 1 + ..._code_review_user_unapprove_mr_monthly.yml | 1 + ...ode_review_user_resolve_thread_monthly.yml | 1 + ...e_review_user_unresolve_thread_monthly.yml | 1 + ...38_i_code_review_edit_mr_title_monthly.yml | 1 + ...342_i_code_review_edit_mr_desc_monthly.yml | 1 + ...review_user_create_review_note_monthly.yml | 1 + ...ode_review_user_publish_review_monthly.yml | 1 + ...er_create_multiline_mr_comment_monthly.yml | 1 + ...user_edit_multiline_mr_comment_monthly.yml | 1 + ...er_remove_multiline_mr_comment_monthly.yml | 1 + ...18_i_code_review_user_assigned_monthly.yml | 1 + ...de_review_user_marked_as_draft_monthly.yml | 1 + ..._review_user_unmarked_as_draft_monthly.yml | 1 + ...e_review_user_review_requested_monthly.yml | 1 + ...eview_user_approval_rule_added_monthly.yml | 1 + ...iew_user_approval_rule_deleted_monthly.yml | 1 + ...view_user_approval_rule_edited_monthly.yml | 1 + ...eview_user_vs_code_api_request_monthly.yml | 1 + ...view_user_create_mr_from_issue_monthly.yml | 1 + ...ode_review_total_unique_counts_monthly.yml | 1 + ...e_review_user_resolve_conflict_monthly.yml | 1 + ...e_review_user_load_conflict_ui_monthly.yml | 1 + ..._management_issue_title_changed_weekly.yml | 1 + ...w_user_toggled_task_item_status_weekly.yml | 1 + ...0_i_code_review_user_approve_mr_weekly.yml | 1 + ...i_code_review_user_unapprove_mr_weekly.yml | 1 + ...code_review_user_resolve_thread_weekly.yml | 1 + ...de_review_user_unresolve_thread_weekly.yml | 1 + ...336_i_code_review_edit_mr_title_weekly.yml | 1 + ...4340_i_code_review_edit_mr_desc_weekly.yml | 1 + ..._review_user_create_review_note_weekly.yml | 1 + ...code_review_user_publish_review_weekly.yml | 1 + ...ser_create_multiline_mr_comment_weekly.yml | 1 + ..._user_edit_multiline_mr_comment_weekly.yml | 1 + ...ser_remove_multiline_mr_comment_weekly.yml | 1 + ...416_i_code_review_user_assigned_weekly.yml | 1 + ...ode_review_user_marked_as_draft_weekly.yml | 1 + ...e_review_user_unmarked_as_draft_weekly.yml | 1 + ...de_review_user_review_requested_weekly.yml | 1 + ...review_user_approval_rule_added_weekly.yml | 1 + ...view_user_approval_rule_deleted_weekly.yml | 1 + ...eview_user_approval_rule_edited_weekly.yml | 1 + ...review_user_vs_code_api_request_weekly.yml | 1 + ...eview_user_create_mr_from_issue_weekly.yml | 1 + ...code_review_total_unique_counts_weekly.yml | 1 + ...de_review_user_load_conflict_ui_weekly.yml | 2 +- ...de_review_user_resolve_conflict_weekly.yml | 2 +- ..._product_marketing_email_create_0_sent.yml | 2 +- ...t_marketing_email_create_0_cta_clicked.yml | 2 +- ..._product_marketing_email_create_1_sent.yml | 2 +- ...t_marketing_email_create_1_cta_clicked.yml | 2 +- ..._product_marketing_email_create_2_sent.yml | 2 +- ...t_marketing_email_create_2_cta_clicked.yml | 2 +- ..._product_marketing_email_verify_0_sent.yml | 2 +- ...t_marketing_email_verify_0_cta_clicked.yml | 2 +- ..._product_marketing_email_verify_1_sent.yml | 2 +- ...t_marketing_email_verify_1_cta_clicked.yml | 2 +- ..._product_marketing_email_verify_2_sent.yml | 2 +- ...t_marketing_email_verify_2_cta_clicked.yml | 2 +- ...n_product_marketing_email_trial_0_sent.yml | 2 +- ...ct_marketing_email_trial_0_cta_clicked.yml | 2 +- ...n_product_marketing_email_trial_1_sent.yml | 2 +- ...ct_marketing_email_trial_1_cta_clicked.yml | 2 +- ...n_product_marketing_email_trial_2_sent.yml | 2 +- ...ct_marketing_email_trial_2_cta_clicked.yml | 2 +- ...in_product_marketing_email_team_0_sent.yml | 2 +- ...uct_marketing_email_team_0_cta_clicked.yml | 2 +- ...in_product_marketing_email_team_1_sent.yml | 2 +- ...uct_marketing_email_team_1_cta_clicked.yml | 2 +- ...in_product_marketing_email_team_2_sent.yml | 2 +- ...uct_marketing_email_team_2_cta_clicked.yml | 2 +- ...duct_marketing_email_experience_0_sent.yml | 2 +- config/metrics/schema.json | 6 +- .../index.md | 19 ++- doc/ci/yaml/index.md | 55 +++++++ .../database/multiple_databases.md | 56 +++++++ doc/user/group/index.md | 10 +- .../group/value_stream_analytics/index.md | 6 + locale/gitlab.pot | 9 +- package.json | 2 +- spec/frontend/__mocks__/@gitlab/ui.js | 4 +- .../components/diff_line_note_form_spec.js | 13 +- spec/frontend/diffs/utils/diff_line_spec.js | 30 ++++ .../shared/commit_message_field_spec.js | 149 ++++++++++++++++++ .../components/multiline_comment_form_spec.js | 12 -- spec/lib/gitlab/ci/config/extendable_spec.rb | 44 ++++++ spec/lib/gitlab/ci/yaml_processor_spec.rb | 58 +++++++ .../gitlab/usage/metric_definition_spec.rb | 2 + .../cross-database-modification-allowlist.yml | 1 - .../prevent_cross_database_modification.rb | 5 + .../dependencyproxy/dependencyproxy.go | 24 +-- .../helper/httptransport/http_transport.go | 37 +++++ .../internal/imageresizer/image_resizer.go | 20 +-- workhorse/internal/objectstore/object.go | 25 +-- workhorse/internal/sendurl/sendurl.go | 22 +-- .../upstream/roundtripper/roundtripper.go | 12 +- .../upstream/roundtripper/transport.go | 27 ---- .../internal/zipartifacts/open_archive.go | 20 +-- yarn.lock | 8 +- 115 files changed, 790 insertions(+), 207 deletions(-) create mode 100644 app/assets/javascripts/diffs/utils/diff_line.js create mode 100644 app/assets/javascripts/ide/components/shared/commit_message_field.vue create mode 100644 spec/frontend/diffs/utils/diff_line_spec.js create mode 100644 spec/frontend/ide/components/shared/commit_message_field_spec.js create mode 100644 workhorse/internal/helper/httptransport/http_transport.go delete mode 100644 workhorse/internal/upstream/roundtripper/transport.go diff --git a/app/assets/javascripts/cycle_analytics/constants.js b/app/assets/javascripts/cycle_analytics/constants.js index c205aa1e831..d1e837b1af4 100644 --- a/app/assets/javascripts/cycle_analytics/constants.js +++ b/app/assets/javascripts/cycle_analytics/constants.js @@ -47,6 +47,11 @@ export const METRICS_POPOVER_CONTENT = { "ValueStreamAnalytics|Median time from the earliest commit of a linked issue's merge request to when that issue is closed.", ), }, + 'lead-time-for-changes': { + description: s__( + 'ValueStreamAnalytics|Median time between merge request merge and deployment to a production environment for all MRs deployed in the given time period.', + ), + }, 'new-issue': { description: s__('ValueStreamAnalytics|Number of new issues created.') }, 'new-issues': { description: s__('ValueStreamAnalytics|Number of new issues created.') }, deploys: { description: s__('ValueStreamAnalytics|Total number of deploys to production.') }, diff --git a/app/assets/javascripts/diffs/components/diff_comment_cell.vue b/app/assets/javascripts/diffs/components/diff_comment_cell.vue index 4af4b46f94c..a4fae652d02 100644 --- a/app/assets/javascripts/diffs/components/diff_comment_cell.vue +++ b/app/assets/javascripts/diffs/components/diff_comment_cell.vue @@ -29,6 +29,11 @@ export default { required: false, default: false, }, + lineRange: { + type: Object, + required: false, + default: null, + }, linePosition: { type: String, required: false, @@ -59,6 +64,7 @@ export default { @@ -199,7 +209,9 @@ export default { +import { GlIcon, GlPopover } from '@gitlab/ui'; +import { __, sprintf } from '~/locale'; +import { MAX_TITLE_LENGTH, MAX_BODY_LENGTH } from '../../constants'; + +export default { + components: { + GlIcon, + GlPopover, + }, + props: { + text: { + type: String, + required: true, + }, + placeholder: { + type: String, + required: true, + }, + }, + data() { + return { + scrollTop: 0, + isFocused: false, + }; + }, + computed: { + allLines() { + return this.text.split('\n').map((line, i) => ({ + text: line.substr(0, this.getLineLength(i)) || ' ', + highlightedText: line.substr(this.getLineLength(i)), + })); + }, + }, + methods: { + handleScroll() { + if (this.$refs.textarea) { + this.$nextTick(() => { + this.scrollTop = this.$refs.textarea.scrollTop; + }); + } + }, + getLineLength(i) { + return i === 0 ? MAX_TITLE_LENGTH : MAX_BODY_LENGTH; + }, + onInput(e) { + this.$emit('input', e.target.value); + }, + onCtrlEnter() { + if (!this.isFocused) return; + this.$emit('submit'); + }, + updateIsFocused(isFocused) { + this.isFocused = isFocused; + }, + }, + popoverOptions: { + triggers: 'hover', + placement: 'top', + content: sprintf( + __(` + The character highlighter helps you keep the subject line to %{titleLength} characters + and wrap the body at %{bodyLength} so they are readable in git. + `), + { titleLength: MAX_TITLE_LENGTH, bodyLength: MAX_BODY_LENGTH }, + ), + }, +}; + + + diff --git a/app/assets/javascripts/issues_list/service_desk_helper.js b/app/assets/javascripts/issues_list/service_desk_helper.js index f96567ef53b..5cccf2e6bce 100644 --- a/app/assets/javascripts/issues_list/service_desk_helper.js +++ b/app/assets/javascripts/issues_list/service_desk_helper.js @@ -20,7 +20,7 @@ export function generateMessages(emptyStateMeta) { ); const serviceDeskSupportedMessage = s__( - 'ServiceDesk|Issues created from Service Desk emails appear here. Each comment becomes part of the email conversation.', + 'ServiceDesk|Issues created from Service Desk emails will appear here. Each comment becomes part of the email conversation.', ); const commonDescription = ` diff --git a/app/assets/javascripts/notes/components/multiline_comment_form.vue b/app/assets/javascripts/notes/components/multiline_comment_form.vue index 6ad565567be..1633b79c3be 100644 --- a/app/assets/javascripts/notes/components/multiline_comment_form.vue +++ b/app/assets/javascripts/notes/components/multiline_comment_form.vue @@ -1,6 +1,6 @@