Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-10-14 09:09:30 +00:00
parent a5266bda12
commit 641b65c021
17 changed files with 151 additions and 84 deletions

View file

@ -0,0 +1,35 @@
import { Mark, markInputRule } from '@tiptap/core';
import { __ } from '~/locale';
import { PARSE_HTML_PRIORITY_HIGHEST } from '../constants';
export const inputRegex = /(?:^|\s)\$`([^`]+)`\$$/gm;
export default Mark.create({
name: 'mathInline',
parseHTML() {
return [
{
tag: 'code.math[data-math-style=inline]',
priority: PARSE_HTML_PRIORITY_HIGHEST,
},
];
},
renderHTML({ HTMLAttributes }) {
return [
'code',
{
title: __('Inline math'),
'data-toggle': 'tooltip',
class: 'gl-inset-border-1-gray-400',
...HTMLAttributes,
},
0,
];
},
addInputRules() {
return [markInputRule(inputRegex, this.type)];
},
});

View file

@ -32,6 +32,7 @@ import Italic from '../extensions/italic';
import Link from '../extensions/link';
import ListItem from '../extensions/list_item';
import Loading from '../extensions/loading';
import MathInline from '../extensions/math_inline';
import OrderedList from '../extensions/ordered_list';
import Paragraph from '../extensions/paragraph';
import Reference from '../extensions/reference';
@ -106,6 +107,7 @@ export const createContentEditor = ({
Link,
ListItem,
Loading,
MathInline,
OrderedList,
Paragraph,
Reference,

View file

@ -27,6 +27,7 @@ import InlineDiff from '../extensions/inline_diff';
import Italic from '../extensions/italic';
import Link from '../extensions/link';
import ListItem from '../extensions/list_item';
import MathInline from '../extensions/math_inline';
import OrderedList from '../extensions/ordered_list';
import Paragraph from '../extensions/paragraph';
import Reference from '../extensions/reference';
@ -86,6 +87,11 @@ const defaultSerializerConfig = {
: `](${state.esc(href)}${mark.attrs.title ? ` ${state.quote(mark.attrs.title)}` : ''})`;
},
},
[MathInline.name]: {
open: (...args) => `$${defaultMarkdownSerializer.marks.code.open(...args)}`,
close: (...args) => `${defaultMarkdownSerializer.marks.code.close(...args)}$`,
escape: false,
},
[Strike.name]: {
open: '~~',
close: '~~',

View file

@ -68,13 +68,6 @@ import {
TOKEN_TITLE_TYPE,
TOKEN_TITLE_WEIGHT,
} from '~/vue_shared/components/filtered_search_bar/constants';
import AuthorToken from '~/vue_shared/components/filtered_search_bar/tokens/author_token.vue';
import EmojiToken from '~/vue_shared/components/filtered_search_bar/tokens/emoji_token.vue';
import EpicToken from '~/vue_shared/components/filtered_search_bar/tokens/epic_token.vue';
import IterationToken from '~/vue_shared/components/filtered_search_bar/tokens/iteration_token.vue';
import LabelToken from '~/vue_shared/components/filtered_search_bar/tokens/label_token.vue';
import MilestoneToken from '~/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue';
import WeightToken from '~/vue_shared/components/filtered_search_bar/tokens/weight_token.vue';
import eventHub from '../eventhub';
import reorderIssuesMutation from '../queries/reorder_issues.mutation.graphql';
import searchIterationsQuery from '../queries/search_iterations.query.graphql';
@ -84,6 +77,20 @@ import searchUsersQuery from '../queries/search_users.query.graphql';
import IssueCardTimeInfo from './issue_card_time_info.vue';
import NewIssueDropdown from './new_issue_dropdown.vue';
const AuthorToken = () =>
import('~/vue_shared/components/filtered_search_bar/tokens/author_token.vue');
const EmojiToken = () =>
import('~/vue_shared/components/filtered_search_bar/tokens/emoji_token.vue');
const EpicToken = () => import('~/vue_shared/components/filtered_search_bar/tokens/epic_token.vue');
const IterationToken = () =>
import('~/vue_shared/components/filtered_search_bar/tokens/iteration_token.vue');
const LabelToken = () =>
import('~/vue_shared/components/filtered_search_bar/tokens/label_token.vue');
const MilestoneToken = () =>
import('~/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue');
const WeightToken = () =>
import('~/vue_shared/components/filtered_search_bar/tokens/weight_token.vue');
export default {
i18n,
IssuableListTabs,

View file

@ -1,4 +1,5 @@
<script>
import { GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import $ from 'jquery';
import { isEmpty } from 'lodash';
import { scrollToElement } from '~/lib/utils/common_utils';
@ -21,6 +22,9 @@ export default {
ReleaseBlockHeader,
ReleaseBlockMilestoneInfo,
},
directives: {
SafeHtml,
},
mixins: [glFeatureFlagsMixin()],
props: {
release: {
@ -79,6 +83,7 @@ export default {
$(this.$refs['gfm-content']).renderGFM();
},
},
safeHtmlConfig: { ADD_TAGS: ['gl-emoji'] },
};
</script>
<template>
@ -102,10 +107,7 @@ export default {
<evidence-block v-if="hasEvidence" :release="release" />
<div ref="gfm-content" class="card-text gl-mt-3">
<div
class="md"
v-html="release.descriptionHtml /* eslint-disable-line vue/no-v-html */"
></div>
<div v-safe-html:[$options.safeHtmlConfig]="release.descriptionHtml" class="md"></div>
</div>
</div>

View file

@ -9,7 +9,6 @@ module Types
DEFAULT_COMPLEXITY = 1
attr_reader :deprecation, :doc_reference
attr_writer :max_page_size # Can be removed with :performance_roadmap feature flag: https://gitlab.com/gitlab-org/gitlab/-/issues/337198
def initialize(**kwargs, &block)
@calls_gitaly = !!kwargs.delete(:calls_gitaly)

View file

@ -7,7 +7,8 @@ product_stage: package
product_group: group::package
product_category: container registry
value_type: number
status: deprecated
status: removed
milestone_removed: "14.4"
time_frame: all
data_source: redis
distribution:

View file

@ -6,8 +6,6 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Version API **(FREE)**
> Introduced in GitLab 8.13.
Retrieve version information for this GitLab instance. Responds `200 OK` for
authenticated users.

View file

@ -379,6 +379,9 @@ To test frontend events in development:
- Turn off any ad blockers that would prevent Snowplow JS from loading in your environment.
- Turn off "Do Not Track" (DNT) in your browser.
All URLs are pseudonymized. The entity identifier [replaces](https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v2/tracker-setup/other-parameters-2/#Setting_a_custom_page_URL_and_referrer_URL) personally identifiable
information (PII). PII includes usernames, group, and project names.
#### Snowplow Analytics Debugger Chrome Extension
Snowplow Analytics Debugger is a browser extension for testing frontend events. This works on production, staging, and local development environments.

View file

@ -153,6 +153,24 @@ ORDER BY collector_tstamp DESC
LIMIT 20
```
#### Last 100 page view events
```sql
SELECT
-- page_url,
-- page_title,
-- referer_url,
-- marketing_medium,
-- marketing_source,
-- marketing_campaign,
-- browser_window_width,
-- device_is_mobile
*
FROM legacy.snowplow_page_views_30
ORDER BY page_view_start DESC
LIMIT 100
```
### Web-specific parameters
Snowplow JS adds [web-specific parameters](https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/snowplow-tracker-protocol/#Web-specific_parameters) to all web events by default.

View file

@ -26,6 +26,10 @@ The [`StandardContext`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/g
## Default Schema
Frontend events include a [web-specific schema](https://docs.snowplowanalytics.com/docs/understanding-your-pipeline/canonical-event/#Web-specific_fields) provided by Snowplow.
All URLs are pseudonymized. The entity identifier [replaces](https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v2/tracker-setup/other-parameters-2/#Setting_a_custom_page_URL_and_referrer_URL) personally identifiable
information (PII). PII includes usernames, group, and project names.
| Field Name | Required | Type | Description |
|--------------------------|---------------------|-----------|----------------------------------------------------------------------------------------------------------------------------------|
| `app_id` | **{check-circle}** | string | Unique identifier for website / application |

View file

@ -16,8 +16,7 @@ Admin page.
Privacy note: GitLab submits the user's IP and user agent to Akismet.
NOTE:
In GitLab 8.11 and later, all issues are submitted to Akismet.
In earlier GitLab versions, this only applied to API and non-project members.
GitLab submits all issues to Akismet.
Akismet configuration is available to users on self-managed GitLab. Akismet is already enabled on
GitLab SaaS (GitLab.com), where it's configuration and management are handled by GitLab Inc.

View file

@ -6,8 +6,6 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Slack slash commands **(FREE SELF)**
> Introduced in GitLab 8.15.
If you want to control and view GitLab content while you're
working in Slack, you can use Slack slash commands.
To use Slack slash commands, you must configure both Slack and GitLab.

View file

@ -18185,6 +18185,9 @@ msgstr ""
msgid "Inline"
msgstr ""
msgid "Inline math"
msgstr ""
msgid "Input host keys manually"
msgstr ""

View file

@ -0,0 +1,42 @@
import MathInline from '~/content_editor/extensions/math_inline';
import { createTestEditor, createDocBuilder } from '../test_utils';
describe('content_editor/extensions/math_inline', () => {
let tiptapEditor;
let doc;
let p;
let mathInline;
beforeEach(() => {
tiptapEditor = createTestEditor({ extensions: [MathInline] });
({
builders: { doc, p, mathInline },
} = createDocBuilder({
tiptapEditor,
names: {
details: { markType: MathInline.name },
},
}));
});
it.each`
input | insertedNode
${'$`a^2`$'} | ${() => p(mathInline('a^2'))}
${'$`a^2`'} | ${() => p('$`a^2`')}
${'`a^2`$'} | ${() => p('`a^2`$')}
`('with input=$input, then should insert a $insertedNode', ({ input, insertedNode }) => {
const { view } = tiptapEditor;
const expectedDoc = doc(insertedNode());
tiptapEditor.chain().setContent(input).setTextSelection(0).run();
const { state } = tiptapEditor;
const { selection } = state;
// Triggers the event handler that input rules listen to
view.someProp('handleTextInput', (f) => f(view, selection.from, input.length + 1, input));
expect(tiptapEditor.getJSON()).toEqual(expectedDoc.toJSON());
});
});

View file

@ -278,3 +278,12 @@
- `RGBA(0,255,0,0.3)`
- `HSL(540,70%,50%)`
- `HSLA(540,70%,50%,0.3)`
- name: math
markdown: |-
This math is inline $`a^2+b^2=c^2`$.
This is on a separate line:
```math
a^2+b^2=c^2
```

View file

@ -1,117 +1,58 @@
- "./ee/spec/controllers/projects/issues_controller_spec.rb"
- "./ee/spec/controllers/projects/security/vulnerabilities_controller_spec.rb"
- "./ee/spec/features/ci/ci_minutes_spec.rb"
- "./ee/spec/features/merge_request/user_sees_merge_widget_spec.rb"
- "./ee/spec/features/merge_trains/two_merge_requests_on_train_spec.rb"
- "./ee/spec/features/merge_trains/user_adds_merge_request_to_merge_train_spec.rb"
- "./ee/spec/features/merge_trains/user_adds_to_merge_train_when_pipeline_succeeds_spec.rb"
- "./ee/spec/features/projects/pipelines/pipeline_spec.rb"
- "./ee/spec/finders/ee/namespaces/projects_finder_spec.rb"
- "./ee/spec/graphql/ee/resolvers/namespace_projects_resolver_spec.rb"
- "./ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_spec.rb"
- "./ee/spec/lib/ee/gitlab/background_migration/populate_latest_pipeline_ids_spec.rb"
- "./ee/spec/lib/ee/gitlab/background_migration/populate_resolved_on_default_branch_column_spec.rb"
- "./ee/spec/lib/ee/gitlab/background_migration/populate_uuids_for_security_findings_spec.rb"
- "./ee/spec/lib/ee/gitlab/usage_data_spec.rb"
- "./ee/spec/migrations/schedule_populate_resolved_on_default_branch_column_spec.rb"
- "./ee/spec/models/ci/build_spec.rb"
- "./ee/spec/models/ci/minutes/project_monthly_usage_spec.rb"
- "./ee/spec/models/ci/pipeline_spec.rb"
- "./ee/spec/models/ee/vulnerability_spec.rb"
- "./ee/spec/models/project_spec.rb"
- "./ee/spec/models/security/finding_spec.rb"
- "./ee/spec/models/security/scan_spec.rb"
- "./ee/spec/presenters/ci/pipeline_presenter_spec.rb"
- "./ee/spec/requests/api/ci/minutes_spec.rb"
- "./ee/spec/requests/api/graphql/ci/minutes/usage_spec.rb"
- "./ee/spec/requests/api/graphql/mutations/vulnerabilities/create_external_issue_link_spec.rb"
- "./ee/spec/requests/api/graphql/vulnerabilities/location_spec.rb"
- "./ee/spec/requests/api/namespaces_spec.rb"
- "./ee/spec/services/auto_merge/add_to_merge_train_when_pipeline_succeeds_service_spec.rb"
- "./ee/spec/services/ci/minutes/additional_packs/change_namespace_service_spec.rb"
- "./ee/spec/services/ci/minutes/additional_packs/create_service_spec.rb"
- "./ee/spec/services/ci/minutes/refresh_cached_data_service_spec.rb"
- "./ee/spec/services/ci/trigger_downstream_subscription_service_spec.rb"
- "./ee/spec/services/deployments/auto_rollback_service_spec.rb"
- "./ee/spec/services/ee/ci/job_artifacts/destroy_all_expired_service_spec.rb"
- "./ee/spec/services/ee/ci/job_artifacts/destroy_batch_service_spec.rb"
- "./ee/spec/services/ee/issues/build_from_vulnerability_service_spec.rb"
- "./ee/spec/services/ee/merge_requests/create_pipeline_service_spec.rb"
- "./ee/spec/services/ee/merge_requests/refresh_service_spec.rb"
- "./ee/spec/workers/scan_security_report_secrets_worker_spec.rb"
- "./spec/controllers/groups/settings/ci_cd_controller_spec.rb"
- "./spec/controllers/admin/runners_controller_spec.rb"
- "./spec/controllers/projects/merge_requests_controller_spec.rb"
- "./spec/controllers/groups/settings/ci_cd_controller_spec.rb"
- "./spec/controllers/projects/settings/ci_cd_controller_spec.rb"
- "./spec/features/admin/admin_runners_spec.rb"
- "./spec/features/ide/user_opens_merge_request_spec.rb"
- "./spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb"
- "./spec/features/merge_request/user_sees_merge_widget_spec.rb"
- "./spec/features/projects/infrastructure_registry_spec.rb"
- "./spec/features/projects/jobs_spec.rb"
- "./spec/features/projects/pipelines/pipeline_spec.rb"
- "./spec/features/projects/pipelines/pipelines_spec.rb"
- "./spec/finders/ci/pipelines_for_merge_request_finder_spec.rb"
- "./spec/finders/ci/runners_finder_spec.rb"
- "./spec/frontend/fixtures/runner.rb"
- "./spec/graphql/resolvers/ci/group_runners_resolver_spec.rb"
- "./spec/graphql/resolvers/merge_request_pipelines_resolver_spec.rb"
- "./spec/lib/api/entities/package_spec.rb"
- "./spec/lib/gitlab/background_migration/migrate_legacy_artifacts_spec.rb"
- "./spec/mailers/emails/pipelines_spec.rb"
- "./spec/lib/gitlab/background_migration/copy_ci_builds_columns_to_security_scans_spec.rb"
- "./spec/lib/gitlab/background_migration/migrate_pages_metadata_spec.rb"
- "./spec/migrations/20210907211557_finalize_ci_builds_bigint_conversion_spec.rb"
- "./spec/migrations/cleanup_legacy_artifact_migration_spec.rb"
- "./spec/migrations/re_schedule_latest_pipeline_id_population_with_all_security_related_artifact_types_spec.rb"
- "./spec/migrations/schedule_migrate_security_scans_spec.rb"
- "./spec/models/ci/build_spec.rb"
- "./spec/models/ci/job_artifact_spec.rb"
- "./spec/migrations/associate_existing_dast_builds_with_variables_spec.rb"
- "./spec/migrations/schedule_copy_ci_builds_columns_to_security_scans2_spec.rb"
- "./spec/migrations/schedule_pages_metadata_migration_spec.rb"
- "./spec/models/ci/pipeline_spec.rb"
- "./spec/models/ci/runner_spec.rb"
- "./spec/models/merge_request_spec.rb"
- "./spec/models/project_spec.rb"
- "./spec/models/user_spec.rb"
- "./spec/presenters/ci/pipeline_presenter_spec.rb"
- "./spec/presenters/packages/detail/package_presenter_spec.rb"
- "./spec/requests/api/ci/runner/runners_post_spec.rb"
- "./spec/requests/api/ci/runners_spec.rb"
- "./spec/requests/api/commit_statuses_spec.rb"
- "./spec/requests/api/graphql/ci/runner_spec.rb"
- "./spec/requests/api/graphql/group_query_spec.rb"
- "./spec/requests/api/graphql/merge_request/merge_request_spec.rb"
- "./spec/requests/api/graphql/mutations/merge_requests/create_spec.rb"
- "./spec/requests/api/graphql/packages/composer_spec.rb"
- "./spec/requests/api/graphql/packages/conan_spec.rb"
- "./spec/requests/api/graphql/packages/maven_spec.rb"
- "./spec/requests/api/graphql/packages/nuget_spec.rb"
- "./spec/requests/api/graphql/packages/package_spec.rb"
- "./spec/requests/api/graphql/packages/pypi_spec.rb"
- "./spec/requests/api/graphql/project/merge_request/pipelines_spec.rb"
- "./spec/requests/api/graphql/project/merge_request_spec.rb"
- "./spec/requests/api/graphql/project/merge_requests_spec.rb"
- "./spec/requests/api/merge_requests_spec.rb"
- "./spec/requests/api/package_files_spec.rb"
- "./spec/services/ci/destroy_pipeline_service_spec.rb"
- "./spec/services/ci/expire_pipeline_cache_service_spec.rb"
- "./spec/services/ci/job_artifacts/destroy_all_expired_service_spec.rb"
- "./spec/services/ci/job_artifacts/destroy_associations_service_spec.rb"
- "./spec/services/ci/job_artifacts/destroy_batch_service_spec.rb"
- "./spec/services/deployments/older_deployments_drop_service_spec.rb"
- "./spec/services/environments/stop_service_spec.rb"
- "./spec/services/merge_requests/add_todo_when_build_fails_service_spec.rb"
- "./spec/services/merge_requests/post_merge_service_spec.rb"
- "./spec/services/merge_requests/refresh_service_spec.rb"
- "./spec/support/shared_examples/ci/pipeline_email_shared_examples.rb"
- "./spec/support/shared_examples/features/packages_shared_examples.rb"
- "./spec/support/shared_examples/models/concerns/limitable_shared_examples.rb"
- "./spec/support/shared_examples/requests/api/graphql/packages/group_and_project_packages_list_shared_examples.rb"
- "./spec/support/shared_examples/requests/api/graphql/packages/package_details_shared_examples.rb"
- "./spec/support/shared_examples/requests/api/logging_application_context_shared_examples.rb"
- "./spec/support/shared_examples/requests/api/status_shared_examples.rb"
- "./spec/support/shared_examples/requests/graphql_shared_examples.rb"
- "./spec/support/shared_examples/services/packages_shared_examples.rb"
- "./spec/support/shared_examples/workers/idempotency_shared_examples.rb"
- "./spec/migrations/associate_existing_dast_builds_with_variables_spec.rb"
- "./spec/migrations/schedule_pages_metadata_migration_spec.rb"
- "./spec/migrations/schedule_copy_ci_builds_columns_to_security_scans2_spec.rb"
- "./spec/lib/gitlab/background_migration/copy_ci_builds_columns_to_security_scans_spec.rb"
- "./spec/lib/gitlab/background_migration/migrate_pages_metadata_spec.rb"