Add latest changes from gitlab-org/gitlab@master
|
|
@ -1 +1 @@
|
|||
f739ec3e90a62e14c7fef617c816f75f98bd39a0
|
||||
64d528040625ca4350ce1d0f1df4f037f0cc5d37
|
||||
|
|
|
|||
3
Gemfile
|
|
@ -261,6 +261,8 @@ gem 'rouge', '~> 4.3.0', feature_category: :shared
|
|||
gem 'truncato', '~> 0.7.12', feature_category: :team_planning
|
||||
gem 'nokogiri', '~> 1.16', feature_category: :shared
|
||||
gem 'gitlab-glfm-markdown', '~> 0.0.21', feature_category: :markdown
|
||||
gem 'tanuki_emoji', '~> 0.9', feature_category: :markdown
|
||||
gem 'unicode-emoji', '~> 3.6', feature_category: :markdown
|
||||
|
||||
# Calendar rendering
|
||||
gem 'icalendar', '~> 2.10.1', feature_category: :system_access
|
||||
|
|
@ -376,7 +378,6 @@ gem 'terser', '1.0.2' # rubocop:todo Gemfile/MissingFeatureCategory
|
|||
|
||||
gem 'click_house-client', path: 'gems/click_house-client', require: 'click_house/client' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
gem 'addressable', '~> 2.8' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
gem 'tanuki_emoji', '~> 0.9' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
gem 'gon', '~> 6.4.0' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
gem 'request_store', '~> 1.5.1' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
gem 'base32', '~> 0.3.0' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
|
|
|
|||
|
|
@ -747,6 +747,8 @@
|
|||
{"name":"unf_ext","version":"0.0.8.2","platform":"x64-mingw32","checksum":"f7e4c01774c91eb22e30d53dfc40ffbbb5a175f785c8f6f1be17ad96a0b29ed0"},
|
||||
{"name":"unf_ext","version":"0.0.8.2","platform":"x86-mingw32","checksum":"6d44c13c98924bebd15ebdd4ed196ead403a0770ac03304570873349fda2a208"},
|
||||
{"name":"unicode-display_width","version":"2.4.2","platform":"ruby","checksum":"6a10205d1a19ca790c4e53064ba93f09d9eb234bf6bd135d9deb6001c21428be"},
|
||||
{"name":"unicode-emoji","version":"3.6.0","platform":"ruby","checksum":"9d333b0bec74bbf0992b77ce59c809b762f0d1b4018ea454f524491fabc8e5ec"},
|
||||
{"name":"unicode-version","version":"1.4.0","platform":"ruby","checksum":"56409a354a042df2e9acd547f58f81c6ee24839560b47f4907b1c097b6677563"},
|
||||
{"name":"unicode_utils","version":"1.4.0","platform":"ruby","checksum":"b922d0cf2313b6b7136ada6645ce7154ffc86418ca07d53b058efe9eb72f2a40"},
|
||||
{"name":"uniform_notifier","version":"1.16.0","platform":"ruby","checksum":"99b39ee4a0864e3b49f375b5e5803eb26d35ed6eb1719c96407573a87bc4dbb5"},
|
||||
{"name":"unleash","version":"3.2.2","platform":"ruby","checksum":"0f6e56498de920de66a01bceffb93933693ade646bb853fc70eb16bd1026b93b"},
|
||||
|
|
|
|||
|
|
@ -1878,6 +1878,9 @@ GEM
|
|||
unf_ext
|
||||
unf_ext (0.0.8.2)
|
||||
unicode-display_width (2.4.2)
|
||||
unicode-emoji (3.6.0)
|
||||
unicode-version (~> 1.0)
|
||||
unicode-version (1.4.0)
|
||||
unicode_utils (1.4.0)
|
||||
uniform_notifier (1.16.0)
|
||||
unleash (3.2.2)
|
||||
|
|
@ -2308,6 +2311,7 @@ DEPENDENCIES
|
|||
tty-prompt (~> 0.23)
|
||||
typhoeus (~> 1.4.0)
|
||||
undercover (~> 0.5.0)
|
||||
unicode-emoji (~> 3.6)
|
||||
unleash (~> 3.2.2)
|
||||
valid_email (~> 0.1)
|
||||
validates_hostname (~> 1.0.13)
|
||||
|
|
|
|||
|
|
@ -762,6 +762,8 @@
|
|||
{"name":"unf_ext","version":"0.0.8.2","platform":"x64-mingw32","checksum":"f7e4c01774c91eb22e30d53dfc40ffbbb5a175f785c8f6f1be17ad96a0b29ed0"},
|
||||
{"name":"unf_ext","version":"0.0.8.2","platform":"x86-mingw32","checksum":"6d44c13c98924bebd15ebdd4ed196ead403a0770ac03304570873349fda2a208"},
|
||||
{"name":"unicode-display_width","version":"2.4.2","platform":"ruby","checksum":"6a10205d1a19ca790c4e53064ba93f09d9eb234bf6bd135d9deb6001c21428be"},
|
||||
{"name":"unicode-emoji","version":"3.6.0","platform":"ruby","checksum":"9d333b0bec74bbf0992b77ce59c809b762f0d1b4018ea454f524491fabc8e5ec"},
|
||||
{"name":"unicode-version","version":"1.4.0","platform":"ruby","checksum":"56409a354a042df2e9acd547f58f81c6ee24839560b47f4907b1c097b6677563"},
|
||||
{"name":"unicode_utils","version":"1.4.0","platform":"ruby","checksum":"b922d0cf2313b6b7136ada6645ce7154ffc86418ca07d53b058efe9eb72f2a40"},
|
||||
{"name":"uniform_notifier","version":"1.16.0","platform":"ruby","checksum":"99b39ee4a0864e3b49f375b5e5803eb26d35ed6eb1719c96407573a87bc4dbb5"},
|
||||
{"name":"unleash","version":"3.2.2","platform":"ruby","checksum":"0f6e56498de920de66a01bceffb93933693ade646bb853fc70eb16bd1026b93b"},
|
||||
|
|
|
|||
|
|
@ -1905,6 +1905,9 @@ GEM
|
|||
unf_ext
|
||||
unf_ext (0.0.8.2)
|
||||
unicode-display_width (2.4.2)
|
||||
unicode-emoji (3.6.0)
|
||||
unicode-version (~> 1.0)
|
||||
unicode-version (1.4.0)
|
||||
unicode_utils (1.4.0)
|
||||
uniform_notifier (1.16.0)
|
||||
unleash (3.2.2)
|
||||
|
|
@ -2335,6 +2338,7 @@ DEPENDENCIES
|
|||
tty-prompt (~> 0.23)
|
||||
typhoeus (~> 1.4.0)
|
||||
undercover (~> 0.5.0)
|
||||
unicode-emoji (~> 3.6)
|
||||
unleash (~> 3.2.2)
|
||||
valid_email (~> 0.1)
|
||||
validates_hostname (~> 1.0.13)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
query todos_count(
|
||||
$projectId: [ID!]
|
||||
$groupId: [ID!]
|
||||
$authorId: [ID!]
|
||||
$action: [TodoActionEnum!]
|
||||
$type: [TodoTargetEnum!]
|
||||
) {
|
||||
|
|
@ -10,6 +11,7 @@ query todos_count(
|
|||
state: [pending]
|
||||
projectId: $projectId
|
||||
groupId: $groupId
|
||||
authorId: $authorId
|
||||
action: $action
|
||||
type: $type
|
||||
) {
|
||||
|
|
@ -19,6 +21,7 @@ query todos_count(
|
|||
state: [done]
|
||||
projectId: $projectId
|
||||
groupId: $groupId
|
||||
authorId: $authorId
|
||||
action: $action
|
||||
type: $type
|
||||
) {
|
||||
|
|
@ -28,6 +31,7 @@ query todos_count(
|
|||
state: [pending, done]
|
||||
projectId: $projectId
|
||||
groupId: $groupId
|
||||
authorId: $authorId
|
||||
action: $action
|
||||
type: $type
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<script>
|
||||
import { GlIcon, GlLink, GlSprintf } from '@gitlab/ui';
|
||||
import { GlLink, GlSprintf, GlAnimatedUploadIcon } from '@gitlab/ui';
|
||||
import { __ } from '~/locale';
|
||||
import { VALID_DATA_TRANSFER_TYPE, VALID_IMAGE_FILE_MIMETYPE } from './constants';
|
||||
import { isValidImage } from './utils';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
GlIcon,
|
||||
GlLink,
|
||||
GlSprintf,
|
||||
GlAnimatedUploadIcon,
|
||||
},
|
||||
props: {
|
||||
displayAsCard: {
|
||||
|
|
@ -66,6 +66,7 @@ export default {
|
|||
return {
|
||||
dragCounter: 0,
|
||||
isDragDataValid: true,
|
||||
animateUploadIcon: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -74,8 +75,7 @@ export default {
|
|||
},
|
||||
iconStyles() {
|
||||
return {
|
||||
size: this.displayAsCard ? 24 : 16,
|
||||
class: this.displayAsCard ? 'gl-mb-2' : 'gl-mr-3',
|
||||
class: this.displayAsCard ? 'gl-mb-3' : 'gl-mr-3',
|
||||
};
|
||||
},
|
||||
validMimeTypeString() {
|
||||
|
|
@ -143,6 +143,12 @@ export default {
|
|||
onFileInputChange(e) {
|
||||
this.$emit('change', this.singleFileSelection ? e.target.files[0] : e.target.files);
|
||||
},
|
||||
onMouseEnter() {
|
||||
this.animateUploadIcon = true;
|
||||
},
|
||||
onMouseLeave() {
|
||||
this.animateUploadIcon = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -162,13 +168,15 @@ export default {
|
|||
class="card upload-dropzone-card upload-dropzone-border gl-mb-0 gl-h-full gl-w-full gl-items-center gl-justify-center gl-px-5 gl-py-4"
|
||||
type="button"
|
||||
@click="openFileUpload"
|
||||
@mouseenter="onMouseEnter"
|
||||
@mouseleave="onMouseLeave"
|
||||
>
|
||||
<div
|
||||
:class="{ 'gl-flex-col': displayAsCard }"
|
||||
class="gl-flex gl-items-center gl-justify-center gl-text-center"
|
||||
data-testid="dropzone-area"
|
||||
>
|
||||
<gl-icon name="upload" :size="iconStyles.size" :class="iconStyles.class" />
|
||||
<gl-animated-upload-icon :is-on="animateUploadIcon" :class="iconStyles.class" />
|
||||
<p class="gl-mb-0" data-testid="upload-text">
|
||||
<slot name="upload-text" :open-file-upload="openFileUpload">
|
||||
<gl-sprintf
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
}
|
||||
|
||||
&:focus {
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
|
||||
&:not(.ProseMirror-hideselection) .content-editor-selection,
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
span.ProseMirror-selectednode {
|
||||
background-color: $blue-100;
|
||||
box-shadow: 0 2px 0 $blue-100, 0 -2px 0 $blue-100;
|
||||
|
||||
|
||||
&.gfm-project_member, .gfm-project_member {
|
||||
&:not(.current-user) {
|
||||
background-color: $blue-200;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ $item-remove-button-space: 42px;
|
|||
cursor: help;
|
||||
|
||||
&:focus {
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ $item-remove-button-space: 42px;
|
|||
|
||||
a:focus {
|
||||
border-radius: $gl-border-radius-full;
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
&:focus,
|
||||
&:focus-within,
|
||||
&:active {
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,6 @@
|
|||
|
||||
&:focus,
|
||||
&:active {
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
.dropdown-menu-close {
|
||||
&:active,
|
||||
&:focus {
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -632,7 +632,7 @@
|
|||
outline: 0;
|
||||
|
||||
&:focus {
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@
|
|||
.value {
|
||||
display: inline-block;
|
||||
padding: 2px 7px;
|
||||
@include gl-font-sm;
|
||||
@apply gl-text-sm;
|
||||
}
|
||||
|
||||
.name,
|
||||
|
|
@ -207,7 +207,7 @@
|
|||
|
||||
&.focus,
|
||||
&.focus:hover {
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
|
||||
gl-emoji {
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ label {
|
|||
background: var(--gl-control-background-color-default);
|
||||
border-color: var(--gl-control-border-color-default);
|
||||
@apply gl-text-default;
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -264,5 +264,5 @@ label {
|
|||
|
||||
.add-issuable-form-input-wrapper.focus,
|
||||
.issue-token-remove-button:focus {
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@
|
|||
|
||||
&:focus,
|
||||
&:active {
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
|
||||
&:active {
|
||||
|
|
@ -150,7 +150,7 @@
|
|||
|
||||
&:focus,
|
||||
&:active {
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
|
||||
&:active {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
}
|
||||
|
||||
a.ci-icon:focus {
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
|
||||
.ci-icon {
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@
|
|||
padding: 0;
|
||||
|
||||
&:hover {
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
|
||||
&.scrolling {
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ $command-palette-spacing: px-to-rem(14px);
|
|||
|
||||
&:focus,
|
||||
&:active {
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -416,7 +416,7 @@ $command-palette-spacing: px-to-rem(14px);
|
|||
|
||||
#trial-status-sidebar-widget:hover {
|
||||
text-decoration: none;
|
||||
@include gl-text-contrast-light;
|
||||
color: var(--gl-color-neutral-0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -439,7 +439,7 @@ $command-palette-spacing: px-to-rem(14px);
|
|||
|
||||
.super-sidebar-peek,
|
||||
.super-sidebar-peek-hint {
|
||||
@include gl-shadow;
|
||||
@apply gl-shadow;
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
|
|
@ -542,7 +542,7 @@ $command-palette-spacing: px-to-rem(14px);
|
|||
.show-hover-layover {
|
||||
&:hover {
|
||||
.show-hover-layover-hint {
|
||||
@include gl-opacity-10;
|
||||
@apply gl-opacity-10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -571,7 +571,7 @@ $command-palette-spacing: px-to-rem(14px);
|
|||
max-height: 30rem;
|
||||
|
||||
.gl-new-dropdown-item {
|
||||
@include gl-px-3;
|
||||
@apply gl-px-3;
|
||||
}
|
||||
|
||||
// Target groups
|
||||
|
|
@ -740,4 +740,4 @@ $scroll-scrim-height: 2.25rem;
|
|||
|
||||
.custom-gradient-progress .gl-progress {
|
||||
background: linear-gradient(90deg, #ffb177 0%, #936fff 100%);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@
|
|||
// pseudo-element that is the same size as our element, then
|
||||
// animate opacity/transform to give a soothing single pulse
|
||||
.board-column-highlighted::after {
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -1px;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
&:focus:active {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
|
||||
&:hover,
|
||||
&:focus-within {
|
||||
@include gl-shadow-md;
|
||||
@apply gl-shadow-md;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
}
|
||||
|
||||
&:focus {
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
}
|
||||
|
||||
.settings-section:not(.settings-section-no-bottom) ~ .settings-section {
|
||||
@include gl-border-t;
|
||||
@apply gl-border-t;
|
||||
padding-top: $gl-spacing-scale-6;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
@apply gl-text-default;
|
||||
|
||||
border-radius: $gl-border-radius-large;
|
||||
@include gl-shadow-md;
|
||||
@apply gl-shadow-md;
|
||||
|
||||
|
||||
small {
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
line-height: $gl-line-height-16;
|
||||
|
||||
&.cur {
|
||||
@include gl-focus;
|
||||
@apply gl-focus;
|
||||
color: var(--gl-dropdown-option-text-color-hover);
|
||||
background-color: var(--gl-dropdown-option-background-color-unselected-hover);
|
||||
|
||||
|
|
|
|||
|
|
@ -530,7 +530,7 @@ security_trainings:
|
|||
snippets:
|
||||
- table: organizations
|
||||
column: organization_id
|
||||
on_delete: async_nullify
|
||||
on_delete: async_delete
|
||||
terraform_state_versions:
|
||||
- table: ci_builds
|
||||
column: ci_build_id
|
||||
|
|
|
|||
|
|
@ -10,13 +10,5 @@ milestone: '16.5'
|
|||
gitlab_schema: gitlab_main_cell
|
||||
allow_cross_foreign_keys:
|
||||
- gitlab_main_clusterwide
|
||||
desired_sharding_key:
|
||||
group_id:
|
||||
references: namespaces
|
||||
backfill_via:
|
||||
parent:
|
||||
foreign_key: approval_group_rule_id
|
||||
table: approval_group_rules
|
||||
sharding_key: group_id
|
||||
belongs_to: approval_group_rule
|
||||
desired_sharding_key_migration_job_name: BackfillApprovalGroupRulesUsersGroupId
|
||||
sharding_key:
|
||||
group_id: namespaces
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ feature_category: seat_cost_management
|
|||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/163912
|
||||
milestone: '17.4'
|
||||
queued_migration_version: 20240826120429
|
||||
finalized_by: # version of the migration that finalized this BBM
|
||||
finalized_by: '20241020151115'
|
||||
|
|
|
|||
|
|
@ -5,5 +5,4 @@ feature_category: static_application_security_testing
|
|||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/162691
|
||||
milestone: '17.4'
|
||||
queued_migration_version: 20240814085540
|
||||
# Replace with the approximate date you think it's best to ensure the completion of this BBM.
|
||||
finalized_by: # version of the migration that finalized this BBM
|
||||
finalized_by: 20241015185528
|
||||
|
|
|
|||
|
|
@ -10,5 +10,7 @@ description: GitLab snippets allow you to store and share bits of code and text
|
|||
other users.
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/9265de3d25715aeafd38a4ef41596dca058dc18c
|
||||
milestone: 1.0.1
|
||||
gitlab_schema: gitlab_main
|
||||
sharding_key_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/460829
|
||||
gitlab_schema: gitlab_main_cell
|
||||
sharding_key:
|
||||
project_id: projects
|
||||
organization_id: organizations
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class FinalizeResolveVulnerabilitiesForRemovedAnalyzers < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.6'
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
restrict_gitlab_migration gitlab_schema: :gitlab_main
|
||||
|
||||
def up
|
||||
ensure_batched_background_migration_is_finished(
|
||||
job_class_name: 'ResolveVulnerabilitiesForRemovedAnalyzers',
|
||||
table_name: 'vulnerability_reads',
|
||||
column_name: 'id',
|
||||
job_arguments: [],
|
||||
finalize: true
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
# no-op
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class FinalizeBackfillSubscriptionUserAddOnAssignmentsOrganizationId < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.6'
|
||||
disable_ddl_transaction!
|
||||
|
||||
restrict_gitlab_migration gitlab_schema: :gitlab_main_cell
|
||||
|
||||
def up
|
||||
ensure_batched_background_migration_is_finished(
|
||||
job_class_name: 'BackfillSubscriptionUserAddOnAssignmentsOrganizationId',
|
||||
table_name: :subscription_user_add_on_assignments,
|
||||
column_name: :id,
|
||||
job_arguments: [:organization_id, :subscription_add_on_purchases, :organization_id, :add_on_purchase_id],
|
||||
finalize: true
|
||||
)
|
||||
end
|
||||
|
||||
def down; end
|
||||
end
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddApprovalGroupRulesUsersGroupIdNotNull < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.6'
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
add_not_null_constraint :approval_group_rules_users, :group_id
|
||||
end
|
||||
|
||||
def down
|
||||
remove_not_null_constraint :approval_group_rules_users, :group_id
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddSnippetsNotNullContraint < Gitlab::Database::Migration[2.2]
|
||||
disable_ddl_transaction!
|
||||
milestone '17.6'
|
||||
|
||||
def up
|
||||
add_multi_column_not_null_constraint(:snippets, :project_id, :organization_id)
|
||||
end
|
||||
|
||||
def down
|
||||
remove_multi_column_not_null_constraint(:snippets, :project_id, :organization_id)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1 @@
|
|||
fb2e6ff53e5e5e6f0ddc8c975222b7acce5f2a32de5efe1b23457c7d6b1359f9
|
||||
|
|
@ -0,0 +1 @@
|
|||
060440f9953885029e06de96fb76938751c57a0f1155834a2960f0a8c04fbab9
|
||||
|
|
@ -0,0 +1 @@
|
|||
5f2ed53e63c819df44e7dc20a60e047f69243b556b54b4596535e7dcaf40bf9b
|
||||
|
|
@ -0,0 +1 @@
|
|||
7a3e382a6e5564bfa7004bca1a357a910b151e7399c6466113daf01526d97470
|
||||
|
|
@ -6794,7 +6794,8 @@ CREATE TABLE approval_group_rules_users (
|
|||
id bigint NOT NULL,
|
||||
approval_group_rule_id bigint NOT NULL,
|
||||
user_id bigint NOT NULL,
|
||||
group_id bigint
|
||||
group_id bigint,
|
||||
CONSTRAINT check_6db3034f1c CHECK ((group_id IS NOT NULL))
|
||||
);
|
||||
|
||||
CREATE SEQUENCE approval_group_rules_users_id_seq
|
||||
|
|
@ -19074,7 +19075,8 @@ CREATE TABLE snippets (
|
|||
secret boolean DEFAULT false NOT NULL,
|
||||
repository_read_only boolean DEFAULT false NOT NULL,
|
||||
imported_from smallint DEFAULT 0 NOT NULL,
|
||||
organization_id bigint
|
||||
organization_id bigint,
|
||||
CONSTRAINT check_82c1d40fab CHECK ((num_nonnulls(organization_id, project_id) = 1))
|
||||
);
|
||||
|
||||
CREATE SEQUENCE snippets_id_seq
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ explorer. GraphiQL explorer is available for:
|
|||
1. Paste the `query` listed above into the left window of your GraphiQL explorer tool.
|
||||
1. Select **Play** to get the result shown here:
|
||||
|
||||

|
||||

|
||||
|
||||
For more information on:
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
|
@ -26,14 +26,14 @@ The [interactive API documentation tool](https://gitlab.com/gitlab-org/gitlab/-/
|
|||
allows API testing directly on the GitLab.com website. Only a few of the available endpoints are
|
||||
documented with the OpenAPI spec, but the current list demonstrates the functionality of the tool.
|
||||
|
||||

|
||||

|
||||
|
||||
## Endpoint parameters
|
||||
|
||||
When you expand an endpoint listing, you see a description, input parameters (if required),
|
||||
and example server responses. Some parameters include a default or a list of allowed values.
|
||||
|
||||

|
||||

|
||||
|
||||
## Starting an interactive session
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ endpoint (no parameters required). The tool shows the `curl` command and URL of
|
|||
by the server responses that are returned. You can create new responses by editing the relevant parameters
|
||||
and then select **Execute** once again.
|
||||
|
||||

|
||||

|
||||
|
||||
## Vision
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ To add a license to a project:
|
|||
1. On the left sidebar, select **Search or go to** and find your project.
|
||||
1. On the overview page, select **Add LICENSE**. If the license you want is not available as a license template, manually copy the entire, unaltered [text of your chosen license](https://opensource.org/license) into the `LICENSE` file. GitLab defaults to **All rights reserved** if users do not perform this action.
|
||||
|
||||

|
||||

|
||||
|
||||
Applicants must add the correct license to each project in their respective groups or namespaces. When you're sure you're using OSI-approved licenses for your projects, you can take your screenshots.
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ Benefits of the GitLab Open Source Program apply to all projects in a GitLab nam
|
|||
1. Select your project avatar. If you haven't specified an avatar for your project, the avatar displays as a single letter.
|
||||
1. Take a screenshot of the project overview that clearly displays the license you've chosen for your project.
|
||||
|
||||

|
||||

|
||||
|
||||
#### Screenshot 2: License contents
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ Benefits of the GitLab Open Source Program apply to all projects in a GitLab nam
|
|||
1. Select **Code > Repository** and locate the project's `LICENSE` file.
|
||||
1. Take a screenshot of the contents of the file. Make sure the screenshot includes the title of the license.
|
||||
|
||||

|
||||

|
||||
|
||||
#### Screenshot 3: Publicly visible settings
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ To be eligible for the GitLab Open Source Program, projects must be publicly vis
|
|||
1. Select the **Users can request access** checkbox.
|
||||
1. Take a screenshot of this view. Include as much of the publicly visible settings as possible. Make sure to include your project's name in the upper-left of the screenshot.
|
||||
|
||||

|
||||

|
||||
|
||||
NOTE:
|
||||
Exceptions to this public visibility requirement apply in select circumstances (for example, in cases where a project in an applicant's namespace may hold sensitive data). Email `opensource@gitlab.com` with details of your use case to request written permission for exceptions.
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
|
@ -36,7 +36,7 @@ Throughout the year, the number of users fluctuated between 95 and 120.
|
|||
|
||||
The following chart illustrates the number of users during the year, per month and quarter.
|
||||
|
||||

|
||||

|
||||
|
||||
If you are billed annually:
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ After you purchase GitLab Duo, you can assign seats to users to grant access to
|
|||
1. On the left sidebar, select **Search or go to** and find your group.
|
||||
1. Select **Settings > GitLab Duo**.
|
||||
1. From the filter bar, select **Assigned seat** and **Yes**.
|
||||
1. User list is filtered to only users assigned a GitLab Duo seat.
|
||||
1. User list is filtered to only users assigned a GitLab Duo seat.
|
||||
|
||||
### For self-managed
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ Prerequisites:
|
|||
1. In the Customers Portal, on the **Subscriptions & purchases** page, find the subscription you want to apply the trial to.
|
||||
1. At the top of the page, the subscription name appears in a badge.
|
||||
|
||||

|
||||

|
||||
- Ensure the email address you submit for trial registration matches the email address of the [subscription contact](customers_portal.md#change-your-subscription-contact).
|
||||
1. Select **Submit**.
|
||||
|
||||
|
|
@ -239,7 +239,7 @@ Prerequisites:
|
|||
1. In the Customers Portal, on the **Subscriptions & purchases** page, find the subscription you want to apply the trial to.
|
||||
1. At the top of the page, the subscription name appears in a badge.
|
||||
|
||||

|
||||

|
||||
- Ensure the email you submit for trial registration matches the email of the [subscription contact](customers_portal.md#change-your-subscription-contact).
|
||||
1. Select **Submit**.
|
||||
|
||||
|
|
|
|||
|
|
@ -311,19 +311,19 @@ After you run the `rollout 100%` job, you cannot scale down, and must
|
|||
|
||||
Without `INCREMENTAL_ROLLOUT_MODE` and without `STAGING_ENABLED`:
|
||||
|
||||

|
||||

|
||||
|
||||
Without `INCREMENTAL_ROLLOUT_MODE` and with `STAGING_ENABLED`:
|
||||
|
||||

|
||||

|
||||
|
||||
With `INCREMENTAL_ROLLOUT_MODE` set to `manual` and without `STAGING_ENABLED`:
|
||||
|
||||

|
||||

|
||||
|
||||
With `INCREMENTAL_ROLLOUT_MODE` set to `manual` and with `STAGING_ENABLED`:
|
||||
|
||||

|
||||

|
||||
|
||||
## Timed incremental rollout to production
|
||||
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ To use an external managed provider:
|
|||
Because the built-in PostgreSQL setup for review apps and staging is sufficient, you might only need to
|
||||
disable the installation for `production`.
|
||||
|
||||

|
||||

|
||||
|
||||
1. Define the `DATABASE_URL` variable as an environment-scoped variable
|
||||
available to your application. This should be a URL in the following format:
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
|
@ -241,7 +241,7 @@ provides a clear timeline and development structure. However, you
|
|||
only need this procedure if your work was merged into a branch that
|
||||
other developers use as the base for their work.
|
||||
|
||||

|
||||

|
||||
|
||||
To revert changes introduced in a specific commit `B`:
|
||||
|
||||
|
|
@ -257,7 +257,7 @@ Even with an updated history, old commits can still be
|
|||
accessed by commit SHA. This is the case at least until all the automated cleanup
|
||||
of detached commits is performed, or a cleanup is run manually. Even the cleanup might not remove old commits if there are still refs pointing to them.
|
||||
|
||||

|
||||

|
||||
|
||||
### When changing history is acceptable
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ and validate a GitLab Runner fleet hosted on Google Kubernetes Engine (GKE).
|
|||
The following diagram illustrates the path of your runner fleet implementation journey.
|
||||
The guide follows these steps:
|
||||
|
||||

|
||||

|
||||
|
||||
You can use this framework to plan a runner deployment for a single group or a GitLab instance that serves your entire organization.
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ To assess expected CI/CD workloads:
|
|||
The CPU and RAM resource requirements vary depending on factors like the type of programming language or the type of CI/CD job (build, integration tests, unit tests, security scans). The following section describes a method to gather CI/CD job CPU and resource requirements. You can adopt and build on this approach for your own needs.
|
||||
|
||||
For example, to run a CI/CD job similar to the one defined in the FastAPI project fork: [ra-group / fastapi · GitLab](https://gitlab.com/ra-group2/fastapi).
|
||||
The job in this example uses a Python image, downloads the project's requirements, and runs the existing unit tests.
|
||||
The job in this example uses a Python image, downloads the project's requirements, and runs the existing unit tests.
|
||||
The `.gitlab-ci.yml` for the job is as follows:
|
||||
|
||||
```yaml
|
||||
|
|
@ -118,7 +118,7 @@ Complete the following steps to identify the compute and RAM resources needed:
|
|||
NOTE:
|
||||
In the example, the CI/CD job is short-lived, so the sleep between each container poll is set to one second. Adjust this value to better suit your needs.
|
||||
|
||||
1. Analyze the `metrics.log` file to identify the peak usage of the test container.
|
||||
1. Analyze the `metrics.log` file to identify the peak usage of the test container.
|
||||
|
||||
In the example, the maximum CPU usage is `107.50%` and the maximum memory usage is `303.1Mi`.
|
||||
|
||||
|
|
@ -146,7 +146,7 @@ Complete the following steps to identify the compute and RAM resources needed:
|
|||
|
||||
### Analyzing the metrics collected
|
||||
|
||||
Based on the metrics collected, for this job profile, you can limit the Kubernetes executor job to
|
||||
Based on the metrics collected, for this job profile, you can limit the Kubernetes executor job to
|
||||
`1 CPU` and `~304 Mi of Memory`. Even if this conclusion is accurate, it might not be practical for all use cases.
|
||||
|
||||
If you use a cluster with a node pool of three `e2-standard-4` nodes to run jobs, the `1 CPU` limit allows only **12 jobs** to run simultaneously (an `e2-standard-4` node has **4 vCPU** and **16 GB** of memory). Additional jobs wait for the running jobs to complete and free up the resources before starting.
|
||||
|
|
@ -198,7 +198,7 @@ In the runner fleet configuration example, there are a total of three runner con
|
|||
|
||||
With the Kubernetes executor, you can use the Kubernetes scheduler and overwrite container resources.
|
||||
In theory, you can deploy a single GitLab Runner on a Kubernetes cluster with adequate resources. You
|
||||
can then overwrite container resources to select the appropriate compute type for each CI/CD job.
|
||||
can then overwrite container resources to select the appropriate compute type for each CI/CD job.
|
||||
Implementing this pattern reduces the number of separate runner configurations you need to deploy and operate.
|
||||
|
||||
### Best practices
|
||||
|
|
@ -299,7 +299,7 @@ In the configuration above:
|
|||
|
||||
Here is an illustration of this configuration:
|
||||
|
||||

|
||||

|
||||
|
||||
#### GitLab Runner GRIT configuration
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
|
@ -26,11 +26,11 @@ pipelines and pipelines that failed with an invalid YAML. To filter pipelines ba
|
|||
|
||||
View successful pipelines:
|
||||
|
||||

|
||||

|
||||
|
||||
View pipeline duration history:
|
||||
|
||||

|
||||

|
||||
|
||||
## View CI/CD analytics
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
|
@ -101,32 +101,6 @@ To use GitLab Duo Workflow:
|
|||
- Merge request ID: In GitLab, the ID is in the merge request URL.
|
||||
- Project ID: In GitLab, the ID is on the project overview page. In the upper-right corner, select the vertical ellipsis (**{ellipsis_v}**) to view it.
|
||||
|
||||
## Use cURL to run GitLab Duo Workflow against a CI/CD pipeline
|
||||
|
||||
Instead of running GitLab Workflow in VS Code, you can use a cURL command. See
|
||||
[the handbook](https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/duo_workflow/#with-remote-ci-pipeline-execution) for details.
|
||||
|
||||
1. Create a personal access token with the `api` scope, or create an OAuth access token with the `ai_workflows` scope.
|
||||
1. Start GitLab Workflow in a CI/CD pipeline by using the following cURL request.
|
||||
|
||||
```shell
|
||||
curl POST --verbose \
|
||||
--header "Authorization: Bearer $YOUR_GITLAB_PAT" \
|
||||
--header "Content-Type: application/json" \
|
||||
--data '{
|
||||
"project_id": "$PROJECT_ID_FOR_RUNNING_WORKFLOW_AGAINST",
|
||||
"start_workflow": true,
|
||||
"goal": "Fix the pipeline for merge request X in project Y."
|
||||
}' \
|
||||
--location 'https://gitlab.com/api/v4/ai/duo_workflows/workflows'
|
||||
```
|
||||
|
||||
The response should be the pipeline ID. To view the pipeline execution, go to:
|
||||
|
||||
```http
|
||||
https://gitlab.com/$namespace/$project/-/pipelines/$pipeline_id
|
||||
```
|
||||
|
||||
## The context Duo Workflow is aware of
|
||||
|
||||
GitLab Duo Workflow is aware of the context you're working in, specifically:
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ You can ask GitLab Duo Chat to explain selected code:
|
|||
1. Select some code in your IDE.
|
||||
1. In Duo Chat, type `/explain`.
|
||||
|
||||

|
||||

|
||||
|
||||
You can also add additional instructions to be considered. For example:
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
|
|
@ -36,7 +36,7 @@ You can view the number of events associated with a specific group member.
|
|||
|
||||
To do this, hover over the bar with the member's name.
|
||||
|
||||

|
||||

|
||||
|
||||
### Zoom in on a chart
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
|
|
@ -287,7 +287,7 @@ You can also create an epic by
|
|||
If an issue belongs to an epic, you can go to the parent epic with the
|
||||
link in the right sidebar.
|
||||
|
||||

|
||||

|
||||
|
||||
## View epics list
|
||||
|
||||
|
|
@ -372,7 +372,7 @@ Each option contains a button that can toggle the order between **Ascending** an
|
|||
The sort option and order is saved and used wherever you browse epics, including the
|
||||
[Roadmap](../roadmap/index.md).
|
||||
|
||||

|
||||

|
||||
|
||||
## Change activity sort order
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
|
@ -438,7 +438,7 @@ You can add a new project to a group in two ways:
|
|||
- Select a group, and then select **New project**. You can then continue [creating your project](../../user/project/index.md).
|
||||
- While you are creating a project, select a group from the dropdown list.
|
||||
|
||||

|
||||

|
||||
|
||||
### Specify who can add projects to a group
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
|
|
@ -144,7 +144,7 @@ these layout presets:
|
|||
|
||||
### Quarters
|
||||
|
||||

|
||||

|
||||
|
||||
In the **Quarters** preset, roadmap shows epics and milestones which have start or due dates
|
||||
**falling within** currently selected date range preset,
|
||||
|
|
@ -154,7 +154,7 @@ the timeline header represent the month of the quarter.
|
|||
|
||||
### Months
|
||||
|
||||

|
||||

|
||||
|
||||
In the **Months** preset, roadmap shows epics and milestones which have start or
|
||||
due dates **falling within** or **going through** currently selected date range
|
||||
|
|
@ -164,7 +164,7 @@ on the start day (Sunday) of the week. This preset is selected by default.
|
|||
|
||||
### Weeks
|
||||
|
||||

|
||||

|
||||
|
||||
In the **Weeks** preset, roadmap shows epics and milestones which have start or due dates **falling
|
||||
within** or **going through** currently selected date range preset, where **today**
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
|
@ -508,7 +508,7 @@ To learn more about the implementation, see the blog post [Applying GitLab Label
|
|||
|
||||
#### Example for custom value stream configuration
|
||||
|
||||

|
||||

|
||||
|
||||
In the example above, two independent value streams are set up for two teams that are using different development workflows in the **Test Group** (top-level namespace).
|
||||
|
||||
|
|
@ -769,7 +769,7 @@ a duration that is half of the selected date range.
|
|||
For example, if you select a 30-day range, a forecast for the following 15 days
|
||||
is displayed.
|
||||
|
||||

|
||||

|
||||
|
||||
Provide feedback on this experimental feature in [issue 416833](https://gitlab.com/gitlab-org/gitlab/-/issues/416833).
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
|
@ -70,7 +70,7 @@ Use CI/CD environment variables to configure your project.
|
|||
1. Set the variable `TF_VAR_agent_token` to the agent token you received in the previous task.
|
||||
1. Set the variable `TF_VAR_kas_address` to the agent server address in the previous task.
|
||||
|
||||

|
||||

|
||||
|
||||
**Optional configuration:**
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
|
@ -35,7 +35,7 @@ last commit, pipeline status, and when it was last deployed.
|
|||
|
||||
The Operations and [Environments](../../ci/environments/environments_dashboard.md) dashboards share the same list of projects. Adding or removing a project from one adds or removes the project from the other.
|
||||
|
||||

|
||||

|
||||
|
||||
## Arranging projects on a dashboard
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ To list all active sessions:
|
|||
1. Select **Edit profile**.
|
||||
1. On the left sidebar, select **Active Sessions**.
|
||||
|
||||

|
||||

|
||||
|
||||
## Active sessions limit
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
|
@ -144,7 +144,7 @@ To re-use templates [you've created](../project/description_templates.md#create-
|
|||
1. From the dropdown list, select your template project as the template repository at group level.
|
||||
1. Select **Save changes**.
|
||||
|
||||

|
||||

|
||||
|
||||
You might also be interested in templates for various
|
||||
[file types in groups](../group/manage.md#group-file-templates).
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
|
@ -130,7 +130,7 @@ To create a milestone:
|
|||
1. Optional. Enter description, start date, and due date.
|
||||
1. Select **New milestone**.
|
||||
|
||||

|
||||

|
||||
|
||||
## Edit a milestone
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
|
@ -95,7 +95,7 @@ For projects living in other GitLab instances (CE or EE), contact
|
|||
your sysadmin asking for this information (which IP address is Pages
|
||||
server running on your instance).
|
||||
|
||||

|
||||

|
||||
|
||||
WARNING:
|
||||
If you use your root domain for your GitLab Pages website
|
||||
|
|
@ -122,7 +122,7 @@ Whether it's a user or a project website, the DNS record
|
|||
should point to your Pages domain (`namespace.gitlab.io`),
|
||||
without any path.
|
||||
|
||||

|
||||

|
||||
|
||||
##### For both root and subdomains
|
||||
|
||||
|
|
|
|||
|
|
@ -21,10 +21,8 @@ module Banzai
|
|||
|
||||
content = node.to_html
|
||||
|
||||
next unless content.include?(':') || emoji_unicode_pattern_untrusted.match?(content)
|
||||
|
||||
html = emoji_unicode_element_unicode_filter(content)
|
||||
html = emoji_name_element_unicode_filter(html)
|
||||
html = emoji_name_element_unicode_filter(html) if content.include?(':')
|
||||
|
||||
next if html == content
|
||||
|
||||
|
|
@ -43,9 +41,13 @@ module Banzai
|
|||
Gitlab::Utils::Gsub
|
||||
.gsub_with_limit(text, emoji_pattern, limit: Banzai::Filter::FILTER_ITEM_LIMIT) do |match_data|
|
||||
emoji = TanukiEmoji.find_by_alpha_code(match_data[0])
|
||||
@emoji_count += 1 if emoji
|
||||
|
||||
Gitlab::Emoji.gl_emoji_tag(emoji) if emoji
|
||||
if emoji
|
||||
@emoji_count += 1
|
||||
Gitlab::Emoji.gl_emoji_tag(emoji)
|
||||
else
|
||||
match_data[0]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -55,11 +57,16 @@ module Banzai
|
|||
#
|
||||
# Returns a String with unicode emoji replaced with gl-emoji unicode.
|
||||
def emoji_unicode_element_unicode_filter(text)
|
||||
emoji_unicode_pattern_untrusted.replace_gsub(text, limit: Banzai::Filter::FILTER_ITEM_LIMIT) do |match|
|
||||
emoji = TanukiEmoji.find_by_codepoints(match[1])
|
||||
@emoji_count += 1 if emoji
|
||||
Gitlab::Utils::Gsub
|
||||
.gsub_with_limit(text, emoji_unicode_pattern, limit: Banzai::Filter::FILTER_ITEM_LIMIT) do |match_data|
|
||||
emoji = TanukiEmoji.find_by_codepoints(match_data[0])
|
||||
|
||||
Gitlab::Emoji.gl_emoji_tag(emoji) if emoji
|
||||
if emoji
|
||||
@emoji_count += 1
|
||||
Gitlab::Emoji.gl_emoji_tag(emoji)
|
||||
else
|
||||
match_data[0]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -68,12 +75,10 @@ module Banzai
|
|||
@emoji_pattern ||= TanukiEmoji.index.alpha_code_pattern
|
||||
end
|
||||
|
||||
# Build an unstrusted regexp that matches all valid unicode emojis names.
|
||||
def self.emoji_unicode_pattern_untrusted
|
||||
return @emoji_unicode_pattern_untrusted if @emoji_unicode_pattern_untrusted
|
||||
|
||||
source = TanukiEmoji.index.codepoints_pattern.source
|
||||
@emoji_unicode_pattern_untrusted = Gitlab::UntrustedRegexp.new(source)
|
||||
def self.emoji_unicode_pattern
|
||||
# Use regex from unicode-emoji gem. This is faster than the built-in TanukiEmoji
|
||||
# regex for large documents.
|
||||
Unicode::Emoji::REGEX_VALID_INCLUDE_TEXT
|
||||
end
|
||||
|
||||
private
|
||||
|
|
@ -82,8 +87,8 @@ module Banzai
|
|||
self.class.emoji_pattern
|
||||
end
|
||||
|
||||
def emoji_unicode_pattern_untrusted
|
||||
self.class.emoji_unicode_pattern_untrusted
|
||||
def emoji_unicode_pattern
|
||||
self.class.emoji_unicode_pattern
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||