Commit 9865195a authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 5532e1820941
......@@ -13,6 +13,7 @@
.default-before_script:
before_script:
- date
- '[ "$FOSS_ONLY" = "1" ] && rm -rf ee/'
- export GOPATH=$CI_PROJECT_DIR/.go
- mkdir -p $GOPATH
- source scripts/utils.sh
......
......@@ -40,6 +40,7 @@
paths:
- vendor/ruby
before_script:
- '[ "$FOSS_ONLY" = "1" ] && rm -rf ee/'
- cd qa/
- bundle install --clean --jobs=$(nproc) --path=vendor --retry=3 --quiet
- bundle check
......
......@@ -347,6 +347,7 @@
Enabled: true
Include:
- 'spec/support/shared_examples/**/*'
- 'ee/spec/support/shared_examples/**/*'
Style/MultilineWhenThen:
Enabled: false
......
......@@ -38,5 +38,5 @@
<icon name="comment" />
</div>
<div class="timeline-content">
<div v-html="timelineContent"></div>
<div ref="timelineContent" v-html="timelineContent"></div>
<div class="discussion-filter-actions mt-2">
......@@ -42,4 +42,4 @@
<div class="discussion-filter-actions mt-2">
<gl-button variant="default" @click="selectFilter(0)">
<gl-button ref="showAllActivity" variant="default" @click="selectFilter(0)">
{{ __('Show all activity') }}
</gl-button>
......@@ -44,6 +44,6 @@
{{ __('Show all activity') }}
</gl-button>
<gl-button variant="default" @click="selectFilter(1)">
<gl-button ref="showComments" variant="default" @click="selectFilter(1)">
{{ __('Show comments only') }}
</gl-button>
</div>
......
......@@ -12,7 +12,13 @@
<template>
<div class="note-attachment">
<a v-if="attachment.image" :href="attachment.url" target="_blank" rel="noopener noreferrer">
<a
v-if="attachment.image"
ref="attachmentImage"
:href="attachment.url"
target="_blank"
rel="noopener noreferrer"
>
<img :src="attachment.url" class="note-image-attach" />
</a>
<div class="attachment">
......@@ -16,7 +22,13 @@
<img :src="attachment.url" class="note-image-attach" />
</a>
<div class="attachment">
<a v-if="attachment.url" :href="attachment.url" target="_blank" rel="noopener noreferrer">
<a
v-if="attachment.url"
ref="attachmentUrl"
:href="attachment.url"
target="_blank"
rel="noopener noreferrer"
>
<i class="fa fa-paperclip" aria-hidden="true"> </i> {{ attachment.filename }}
</a>
</div>
......
......@@ -63,9 +63,9 @@
<template>
<div class="note-header-info">
<div v-if="includeToggle" class="discussion-actions">
<div v-if="includeToggle" ref="discussionActions" class="discussion-actions">
<button
class="note-action-button discussion-toggle-button js-vue-toggle-button"
type="button"
@click="handleToggle"
>
......@@ -67,9 +67,9 @@
<button
class="note-action-button discussion-toggle-button js-vue-toggle-button"
type="button"
@click="handleToggle"
>
<i :class="toggleChevronClass" class="fa" aria-hidden="true"></i>
<i ref="chevronIcon" :class="toggleChevronClass" class="fa" aria-hidden="true"></i>
{{ __('Toggle thread') }}
</button>
</div>
......@@ -90,7 +90,7 @@
<span class="note-headline-light note-headline-meta">
<span class="system-note-message"> <slot></slot> </span>
<template v-if="createdAt">
<span class="system-note-separator">
<span ref="actionText" class="system-note-separator">
<template v-if="actionText">{{ actionText }}</template>
</span>
<a
......@@ -94,6 +94,7 @@
<template v-if="actionText">{{ actionText }}</template>
</span>
<a
ref="noteTimestamp"
:href="noteTimestampLink"
class="note-timestamp system-note-separator"
@click="updateTargetNoteHash"
......
<script>
import _ from 'underscore';
import $ from 'jquery';
import { slugify } from '~/lib/utils/text_utility';
import { getLocationHash } from '~/lib/utils/url_utility';
import { scrollToElement } from '~/lib/utils/common_utils';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
......@@ -3,7 +4,8 @@
import { slugify } from '~/lib/utils/text_utility';
import { getLocationHash } from '~/lib/utils/url_utility';
import { scrollToElement } from '~/lib/utils/common_utils';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import '~/behaviors/markdown/render_gfm';
import EvidenceBlock from './evidence_block.vue';
import ReleaseBlockAssets from './release_block_assets.vue';
import ReleaseBlockFooter from './release_block_footer.vue';
......@@ -65,4 +67,5 @@
return Boolean(this.glFeatures.releaseIssueSummary && !_.isEmpty(this.release.milestones));
},
},
mounted() {
......@@ -68,4 +71,6 @@
mounted() {
this.renderGFM();
const hash = getLocationHash();
if (hash && slugify(hash) === this.id) {
this.isHighlighted = true;
......@@ -76,6 +81,11 @@
scrollToElement(this.$el);
}
},
methods: {
renderGFM() {
$(this.$refs['gfm-content']).renderGFM();
},
},
};
</script>
<template>
......@@ -91,7 +101,7 @@
<release-block-assets v-if="shouldRenderAssets" :assets="assets" />
<evidence-block v-if="hasEvidence && shouldShowEvidence" :release="release" />
<div class="card-text prepend-top-default">
<div ref="gfm-content" class="card-text prepend-top-default">
<div v-html="release.description_html"></div>
</div>
</div>
......
# frozen_string_literal: true
module Types
module BlobViewers
class TypeEnum < BaseEnum
graphql_name 'BlobViewersType'
description 'Types of blob viewers'
value 'rich', value: :rich
value 'simple', value: :simple
value 'auxiliary', value: :auxiliary
end
end
end
......@@ -36,10 +36,6 @@
description: 'File Name of the snippet',
null: true
field :content, GraphQL::STRING_TYPE,
description: 'Content of the snippet',
null: false
field :description, GraphQL::STRING_TYPE,
description: 'Description of the snippet',
null: true
......@@ -64,6 +60,10 @@
description: 'Raw URL of the snippet',
null: false
field :blob, type: Types::Snippets::BlobType,
description: 'Snippet blob',
null: false
markdown_field :description_html, null: true, method: :description
end
end
# frozen_string_literal: true
module Types
module Snippets
# rubocop: disable Graphql/AuthorizeTypes
class BlobType < BaseObject
graphql_name 'SnippetBlob'
description 'Represents the snippet blob'
present_using SnippetBlobPresenter
field :highlighted_data, GraphQL::STRING_TYPE,
description: 'Blob highlighted data',
null: true
field :raw_path, GraphQL::STRING_TYPE,
description: 'Blob raw content endpoint path',
null: false
field :size, GraphQL::INT_TYPE,
description: 'Blob size',
null: false
field :binary, GraphQL::BOOLEAN_TYPE,
description: 'Shows whether the blob is binary',
method: :binary?,
null: false
field :name, GraphQL::STRING_TYPE,
description: 'Blob name',
null: true
field :path, GraphQL::STRING_TYPE,
description: 'Blob path',
null: true
field :simple_viewer, type: Types::Snippets::BlobViewerType,
description: 'Blob content simple viewer',
null: false
field :rich_viewer, type: Types::Snippets::BlobViewerType,
description: 'Blob content rich viewer',
null: true
end
# rubocop: enable Graphql/AuthorizeTypes
end
end
# frozen_string_literal: true
module Types
module Snippets
class BlobViewerType < BaseObject # rubocop:disable Graphql/AuthorizeTypes
graphql_name 'SnippetBlobViewer'
description 'Represents how the blob content should be displayed'
field :type, Types::BlobViewers::TypeEnum,
description: 'Type of blob viewer',
null: false
field :load_async, GraphQL::BOOLEAN_TYPE,
description: 'Shows whether the blob content is loaded async',
null: false
field :collapsed, GraphQL::BOOLEAN_TYPE,
description: 'Shows whether the blob should be displayed collapsed',
method: :collapsed?,
null: false
field :too_large, GraphQL::BOOLEAN_TYPE,
description: 'Shows whether the blob too large to be displayed',
method: :too_large?,
null: false
field :render_error, GraphQL::STRING_TYPE,
description: 'Error rendering the blob content',
null: true
field :file_type, GraphQL::STRING_TYPE,
description: 'Content file type',
method: :partial_name,
null: false
field :loading_partial_name, GraphQL::STRING_TYPE,
description: 'Loading partial name',
null: false
end
end
end
......@@ -5,8 +5,6 @@
class Epic < ApplicationRecord
include IgnorableColumns
ignore_column :milestone_id, remove_after: '2020-02-01', remove_with: '12.8'
def self.link_reference_pattern
nil
end
......
......@@ -9,7 +9,7 @@
Gitlab::Highlight.highlight(
blob.path,
limited_blob_data(to: to),
language: blob.language_from_gitattributes,
language: language,
plain: plain
)
end
......@@ -37,4 +37,8 @@
def all_lines
@all_lines ||= blob.data.lines
end
def language
blob.language_from_gitattributes
end
end
# frozen_string_literal: true
class SnippetBlobPresenter < BlobPresenter
def highlighted_data
return if blob.binary?
if blob.rich_viewer&.partial_name == 'markup'
blob.rendered_markup
else
highlight
end
end
def raw_path
if snippet.is_a?(ProjectSnippet)
raw_project_snippet_path(snippet.project, snippet)
else
raw_snippet_path(snippet)
end
end
private
def snippet
blob.snippet
end
def language
nil
end
end
......@@ -36,6 +36,8 @@
private
def store_metrics(response)
return unless response['conv_index'].present?
metrics = response['conv_index'] || response['dev_ops_score']
return unless metrics.present?
DevOpsScore::Metric.create!(
......@@ -40,6 +42,6 @@
DevOpsScore::Metric.create!(
response['conv_index'].slice(*METRICS)
metrics.slice(*METRICS)
)
end
end
# This file is generated automatically by
# bin/rake gitlab:sidekiq:all_queues_yml:generate
#
# Do not edit it manually!
---
- auto_devops:auto_devops_disable
......@@ -1,4 +5,3 @@
---
- auto_devops:auto_devops_disable
- auto_merge:auto_merge_process
......@@ -4,7 +7,6 @@
- auto_merge:auto_merge_process
- chaos:chaos_cpu_spin
- chaos:chaos_db_spin
- chaos:chaos_kill
- chaos:chaos_leak_mem
- chaos:chaos_sleep
......@@ -6,7 +8,8 @@
- chaos:chaos_cpu_spin
- chaos:chaos_db_spin
- chaos:chaos_kill
- chaos:chaos_leak_mem
- chaos:chaos_sleep
- container_repository:cleanup_container_repository
- container_repository:delete_container_repository
- cronjob:admin_email
......@@ -12,5 +15,6 @@
- cronjob:admin_email
- cronjob:ci_archive_traces_cron
- cronjob:container_expiration_policy
- cronjob:expire_build_artifacts
- cronjob:gitlab_usage_ping
- cronjob:import_export_project_cleanup
......@@ -13,7 +17,8 @@
- cronjob:container_expiration_policy
- cronjob:expire_build_artifacts
- cronjob:gitlab_usage_ping
- cronjob:import_export_project_cleanup
- cronjob:pages_domain_verification_cron
- cronjob:issue_due_scheduler
- cronjob:namespaces_prune_aggregation_schedules
- cronjob:pages_domain_removal_cron
- cronjob:pages_domain_ssl_renewal_cron
......@@ -18,5 +23,6 @@
- cronjob:pages_domain_removal_cron
- cronjob:pages_domain_ssl_renewal_cron
- cronjob:pages_domain_verification_cron
- cronjob:personal_access_tokens_expiring
- cronjob:pipeline_schedule
- cronjob:prune_old_events
......@@ -20,9 +26,10 @@
- cronjob:personal_access_tokens_expiring
- cronjob:pipeline_schedule
- cronjob:prune_old_events
- cronjob:prune_web_hook_logs
- cronjob:remove_expired_group_links
- cronjob:remove_expired_members
- cronjob:remove_unreferenced_lfs_objects
- cronjob:repository_archive_cache
- cronjob:repository_check_dispatch
- cronjob:requests_profiles
......@@ -23,9 +30,10 @@
- cronjob:remove_expired_group_links
- cronjob:remove_expired_members
- cronjob:remove_unreferenced_lfs_objects
- cronjob:repository_archive_cache
- cronjob:repository_check_dispatch
- cronjob:requests_profiles
- cronjob:schedule_migrate_external_diffs
- cronjob:stuck_ci_jobs
- cronjob:stuck_import_jobs
- cronjob:stuck_merge_jobs
......@@ -29,5 +37,4 @@
- cronjob:stuck_ci_jobs
- cronjob:stuck_import_jobs
- cronjob:stuck_merge_jobs
- cronjob:ci_archive_traces_cron
- cronjob:trending_projects
......@@ -33,8 +40,6 @@
- cronjob:trending_projects
- cronjob:issue_due_scheduler
- cronjob:prune_web_hook_logs
- cronjob:schedule_migrate_external_diffs
- cronjob:namespaces_prune_aggregation_schedules
- deployment:deployments_finished
- deployment:deployments_success
- gcp_cluster:cluster_configure
- gcp_cluster:cluster_install_app
- gcp_cluster:cluster_patch_app
......@@ -39,3 +44,5 @@
- gcp_cluster:cluster_install_app
- gcp_cluster:cluster_patch_app
- gcp_cluster:cluster_project_configure
- gcp_cluster:cluster_provision
- gcp_cluster:cluster_upgrade_app
......@@ -41,5 +48,10 @@
- gcp_cluster:cluster_upgrade_app
- gcp_cluster:cluster_provision
- gcp_cluster:cluster_wait_for_app_installation
- gcp_cluster:cluster_wait_for_ingress_ip_address
- gcp_cluster:clusters_applications_activate_service
- gcp_cluster:clusters_applications_deactivate_service
- gcp_cluster:clusters_applications_uninstall
- gcp_cluster:clusters_applications_wait_for_uninstall_app
- gcp_cluster:clusters_cleanup_app
- gcp_cluster:clusters_cleanup_project_namespace
- gcp_cluster:clusters_cleanup_service_account
......@@ -43,5 +55,4 @@
- gcp_cluster:clusters_cleanup_app
- gcp_cluster:clusters_cleanup_project_namespace
- gcp_cluster:clusters_cleanup_service_account
- gcp_cluster:cluster_wait_for_app_installation
- gcp_cluster:wait_for_cluster_creation
......@@ -47,15 +58,3 @@
- gcp_cluster:wait_for_cluster_creation
- gcp_cluster:cluster_wait_for_ingress_ip_address
- gcp_cluster:cluster_configure
- gcp_cluster:cluster_project_configure
- gcp_cluster:clusters_applications_wait_for_uninstall_app
- gcp_cluster:clusters_applications_uninstall
- gcp_cluster:clusters_cleanup_app
- gcp_cluster:clusters_cleanup_project_namespace
- gcp_cluster:clusters_cleanup_service_account
- gcp_cluster:clusters_applications_activate_service
- gcp_cluster:clusters_applications_deactivate_service
- github_import_advance_stage
- github_importer:github_import_import_diff_note
- github_importer:github_import_import_issue
......@@ -60,3 +59,4 @@
- github_importer:github_import_import_diff_note
- github_importer:github_import_import_issue
- github_importer:github_import_import_lfs_object
- github_importer:github_import_import_note
......@@ -62,7 +62,6 @@
- github_importer:github_import_import_note
- github_importer:github_import_import_lfs_object
- github_importer:github_import_import_pull_request
- github_importer:github_import_refresh_import_jid
- github_importer:github_import_stage_finish_import
- github_importer:github_import_stage_import_base_data
- github_importer:github_import_stage_import_issues_and_diff_notes
......@@ -64,6 +63,7 @@
- github_importer:github_import_import_pull_request
- github_importer:github_import_refresh_import_jid
- github_importer:github_import_stage_finish_import
- github_importer:github_import_stage_import_base_data
- github_importer:github_import_stage_import_issues_and_diff_notes
- github_importer:github_import_stage_import_lfs_objects
- github_importer:github_import_stage_import_notes
......@@ -69,4 +69,3 @@
- github_importer:github_import_stage_import_notes
- github_importer:github_import_stage_import_lfs_objects
- github_importer:github_import_stage_import_pull_requests
- github_importer:github_import_stage_import_repository
......@@ -71,4 +70,3 @@
- github_importer:github_import_stage_import_pull_requests
- github_importer:github_import_stage_import_repository
- hashed_storage:hashed_storage_migrator
......@@ -74,4 +72,3 @@
- hashed_storage:hashed_storage_migrator
- hashed_storage:hashed_storage_rollbacker
- hashed_storage:hashed_storage_project_migrate
- hashed_storage:hashed_storage_project_rollback
......@@ -76,5 +73,5 @@
- hashed_storage:hashed_storage_project_migrate
- hashed_storage:hashed_storage_project_rollback
- hashed_storage:hashed_storage_rollbacker
- mail_scheduler:mail_scheduler_issue_due
- mail_scheduler:mail_scheduler_notification_service
......@@ -79,5 +76,9 @@
- mail_scheduler:mail_scheduler_issue_due
- mail_scheduler:mail_scheduler_notification_service
- notifications:new_release
- object_pool:object_pool_create
- object_pool:object_pool_destroy
- object_pool:object_pool_join
- object_pool:object_pool_schedule_join
- object_storage:object_storage_background_move
- object_storage:object_storage_migrate_uploads
......@@ -82,7 +83,8 @@
- object_storage:object_storage_background_move
- object_storage:object_storage_migrate_uploads
- pipeline_background:archive_trace
- pipeline_background:ci_build_trace_chunk_flush
- pipeline_cache:expire_job_cache
- pipeline_cache:expire_pipeline_cache
- pipeline_creation:create_pipeline
- pipeline_creation:run_pipeline_schedule
......@@ -85,9 +87,7 @@
- pipeline_cache:expire_job_cache
- pipeline_cache:expire_pipeline_cache
- pipeline_creation:create_pipeline
- pipeline_creation:run_pipeline_schedule
- pipeline_background:archive_trace
- pipeline_background:ci_build_trace_chunk_flush
- pipeline_default:build_coverage
- pipeline_default:build_trace_sections
- pipeline_default:pipeline_metrics
......@@ -95,6 +95,5 @@
- pipeline_hooks:build_hooks
- pipeline_hooks:pipeline_hooks
- pipeline_processing:build_finished
- pipeline_processing:ci_build_prepare
- pipeline_processing:build_queue
- pipeline_processing:build_success
......@@ -99,7 +98,10 @@
- pipeline_processing:build_queue
- pipeline_processing:build_success
- pipeline_processing:ci_build_prepare
- pipeline_processing:ci_build_schedule
- pipeline_processing:ci_resource_groups_assign_resource_from_resource_group
- pipeline_processing:pipeline_process
- pipeline_processing:pipeline_success
- pipeline_processing:pipeline_update
- pipeline_processing:stage_update
- pipeline_processing:update_head_pipeline_for_merge_request
......@@ -101,12 +103,7 @@
- pipeline_processing:pipeline_process
- pipeline_processing:pipeline_success
- pipeline_processing:pipeline_update
- pipeline_processing:stage_update
- pipeline_processing:update_head_pipeline_for_merge_request
- pipeline_processing:ci_build_schedule
- pipeline_processing:ci_resource_groups_assign_resource_from_resource_group
- deployment:deployments_success
- deployment:deployments_finished
- repository_check:repository_check_batch
- repository_check:repository_check_clear
......@@ -112,3 +109,2 @@
- repository_check:repository_check_clear
- repository_check:repository_check_batch
- repository_check:repository_check_single_repository
......@@ -114,5 +110,4 @@
- repository_check:repository_check_single_repository
- todos_destroyer:todos_destroyer_confidential_issue
- todos_destroyer:todos_destroyer_entity_leave
- todos_destroyer:todos_destroyer_group_private
......@@ -116,4 +111,5 @@
- todos_destroyer:todos_destroyer_confidential_issue
- todos_destroyer:todos_destroyer_entity_leave
- todos_destroyer:todos_destroyer_group_private
- todos_destroyer:todos_destroyer_private_features
- todos_destroyer:todos_destroyer_project_private
......@@ -119,5 +115,2 @@
- todos_destroyer:todos_destroyer_project_private
- todos_destroyer:todos_destroyer_private_features
- update_namespace_statistics:namespaces_schedule_aggregation
- update_namespace_statistics:namespaces_root_statistics
......@@ -123,18 +116,5 @@
- update_namespace_statistics:namespaces_root_statistics
- object_pool:object_pool_create
- object_pool:object_pool_schedule_join
- object_pool:object_pool_join
- object_pool:object_pool_destroy
- container_repository:delete_container_repository
- container_repository:cleanup_container_repository
- notifications:new_release
- default
- mailers # ActionMailer::DeliveryJob.queue_name