Skip to content

Commit 78c64b0

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent f72996e commit 78c64b0

File tree

68 files changed

+26864
-7537
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+26864
-7537
lines changed

app/assets/javascripts/vue_shared/components/crud_component.vue

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
<script>
2-
import { GlButton, GlIcon, GlBadge, GlLoadingIcon, GlLink, GlTooltipDirective } from '@gitlab/ui';
2+
import {
3+
GlButton,
4+
GlIcon,
5+
GlBadge,
6+
GlSkeletonLoader,
7+
GlLink,
8+
GlTooltipDirective,
9+
} from '@gitlab/ui';
310
import { __ } from '~/locale';
411
512
export default {
613
components: {
714
GlButton,
815
GlIcon,
916
GlBadge,
10-
GlLoadingIcon,
17+
GlSkeletonLoader,
1118
GlLink,
1219
},
1320
directives: {
@@ -121,7 +128,7 @@ export default {
121128
},
122129
displayedCount() {
123130
if (this.isLoading) {
124-
return '...';
131+
return null;
125132
}
126133
127134
return this.icon && !this.count ? '0' : this.count;
@@ -276,7 +283,8 @@ export default {
276283
:class="[bodyClass, { 'gl-rounded-b-base': !$scopedSlots.footer }]"
277284
data-testid="crud-body"
278285
>
279-
<gl-loading-icon v-if="isLoading" size="sm" data-testid="crud-loading" />
286+
<gl-skeleton-loader v-if="isLoading" :width="400" :lines="3" data-testid="crud-loading" />
287+
280288
<span v-else-if="$scopedSlots.empty" class="gl-text-subtle" data-testid="crud-empty">
281289
<slot name="empty"></slot>
282290
</span>

app/assets/javascripts/webhooks/components/webhook_form_app.vue

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
<script>
2+
import { GlFormGroup, GlFormInput, GlFormTextarea } from '@gitlab/ui';
3+
24
import FormUrlApp from './form_url_app.vue';
35
import FormCustomHeaders from './form_custom_headers.vue';
46
57
export default {
68
components: {
9+
GlFormGroup,
10+
GlFormInput,
11+
GlFormTextarea,
712
FormUrlApp,
813
FormCustomHeaders,
914
},
@@ -16,19 +21,57 @@ export default {
1621
initialUrlVariables: {
1722
type: Array,
1823
required: false,
19-
default: null,
24+
default: () => [],
2025
},
2126
initialCustomHeaders: {
2227
type: Array,
2328
required: false,
24-
default: null,
29+
default: () => [],
30+
},
31+
initialName: {
32+
type: String,
33+
required: false,
34+
default: '',
35+
},
36+
initialDescription: {
37+
type: String,
38+
required: false,
39+
default: '',
2540
},
2641
},
42+
data() {
43+
return {
44+
name: this.initialName,
45+
description: this.initialDescription,
46+
};
47+
},
2748
};
2849
</script>
2950

3051
<template>
3152
<div>
53+
<gl-form-group :label="s__('Webhooks|Name (optional)')" label-for="webhook-name">
54+
<gl-form-input
55+
id="webhook-name"
56+
v-model="name"
57+
name="hook[name]"
58+
class="gl-form-input-xl"
59+
data-testid="webhook-name"
60+
/>
61+
</gl-form-group>
62+
63+
<gl-form-group :label="s__('Webhooks|Description (optional)')" label-for="webhook-description">
64+
<gl-form-textarea
65+
id="webhook-description"
66+
v-model="description"
67+
name="hook[description]"
68+
class="gl-form-input-xl"
69+
rows="4"
70+
maxlength="2048"
71+
data-testid="webhook-description"
72+
/>
73+
</gl-form-group>
74+
3275
<form-url-app :initial-url="initialUrl" :initial-url-variables="initialUrlVariables" />
3376
<form-custom-headers :initial-custom-headers="initialCustomHeaders" />
3477
</div>

app/assets/javascripts/webhooks/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,22 @@ export default () => {
99
return null;
1010
}
1111

12-
const { url: initialUrl, urlVariables, customHeaders } = el.dataset;
12+
const {
13+
name: initialName,
14+
description: initialDescription,
15+
url: initialUrl,
16+
urlVariables,
17+
customHeaders,
18+
} = el.dataset;
1319

1420
return new Vue({
1521
el,
1622
name: 'WebhookFormRoot',
1723
render(createElement) {
1824
return createElement(WebhookFormApp, {
1925
props: {
26+
initialName,
27+
initialDescription,
2028
initialUrl,
2129
initialUrlVariables: JSON.parse(urlVariables),
2230
initialCustomHeaders: JSON.parse(customHeaders),

app/helpers/hooks_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
module HooksHelper
44
def webhook_form_data(hook)
55
{
6+
name: hook.name,
7+
description: hook.description,
68
url: hook.url,
79
url_variables: Gitlab::Json.dump(hook.url_variables.keys.map { { key: _1 } }),
810
custom_headers: Gitlab::Json.dump(hook.custom_headers.keys.map { { key: _1, value: WebHook::SECRET_MASK } })

app/models/packages/terraform_module/metadatum.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Metadatum < ApplicationRecord
1515

1616
attribute :fields, default: -> { {} }
1717

18-
ignore_column :semver_patch_convert_to_bigint, remove_with: '18.1', remove_after: '2025-05-20'
18+
ignore_column :semver_patch_convert_to_bigint, remove_with: '18.2', remove_after: '2025-06-20'
1919

2020
validates :package, :project, presence: true
2121
validates :fields, json_schema: { filename: 'terraform_module_metadata', detail_errors: true },

app/views/admin/hooks/_form.html.haml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
= form_errors(hook)
22

3-
.form-group
4-
= form.label :url, _('URL'), class: 'label-bold'
5-
= form.text_field :url, class: 'form-control gl-form-input'
6-
%p.form-text.gl-text-subtle= _('URL must be percent-encoded if necessary.')
73
.form-group
84
= form.label :name, s_('Webhooks|Name (optional)'), class: 'label-bold'
95
= form.text_field :name, value: hook.name, class: 'form-control gl-form-input gl-form-input-xl'
106
.form-group
117
= form.label :description, s_('Webhooks|Description (optional)'), class: 'label-bold'
128
= form.text_area :description, value: hook.description, class: 'form-control gl-form-input gl-form-input-xl', rows: 4, maxlength: 2048
9+
.form-group
10+
= form.label :url, _('URL'), class: 'label-bold'
11+
= form.text_field :url, class: 'form-control gl-form-input'
12+
%p.form-text.gl-text-subtle= _('URL must be percent-encoded if necessary.')
1313
.form-group
1414
= form.label :token, _('Secret token'), class: 'label-bold'
1515
= form.password_field :token, value: hook.masked_token, autocomplete: 'new-password', class: 'form-control gl-form-input gl-max-w-48'

app/views/shared/web_hooks/_form.html.haml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
= form_errors(hook)
22

33
.js-vue-webhook-form{ data: webhook_form_data(hook) }
4-
.form-group
5-
= form.label :name, s_('Webhooks|Name (optional)'), class: 'label-bold'
6-
= form.text_field :name, value: hook.name, class: 'form-control gl-form-input gl-form-input-xl'
7-
.form-group
8-
= form.label :description, s_('Webhooks|Description (optional)'), class: 'label-bold'
9-
= form.text_area :description, value: hook.description, class: 'form-control gl-form-input gl-form-input-xl', rows: 4, maxlength: 2048
104
.form-group
115
= form.label :token, s_('Webhooks|Secret token'), class: 'label-bold'
126
= form.password_field :token, value: hook.masked_token, autocomplete: 'new-password', class: 'form-control gl-form-input gl-form-input-xl'

config/routes/dashboard.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
resources :milestones, only: [:index]
1414
resources :labels, only: [:index]
1515

16-
resources :groups, only: [:index]
16+
resources :groups, only: [:index] do
17+
collection do
18+
get :member, :inactive, to: 'groups#index'
19+
end
20+
end
1721
resources :snippets, only: [:index]
1822

1923
resources :todos, only: [:index, :destroy]

db/docs/batched_background_migrations/backfill_organization_id_on_fork_networks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ feature_category: source_code_management
55
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/184051
66
milestone: '17.11'
77
queued_migration_version: 20250310143706
8-
finalized_by: # version of the migration that finalized this BBM
8+
finalized_by: 20250415100300
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# frozen_string_literal: true
2+
3+
class FinalizeBackfillOrganizationIdOnForkNetworks < Gitlab::Database::Migration[2.2]
4+
milestone '18.0'
5+
disable_ddl_transaction!
6+
7+
restrict_gitlab_migration gitlab_schema: :gitlab_main
8+
9+
def up
10+
ensure_batched_background_migration_is_finished(
11+
job_class_name: 'BackfillOrganizationIdOnForkNetworks',
12+
table_name: :fork_networks,
13+
column_name: :id,
14+
job_arguments: [],
15+
finalize: true
16+
)
17+
end
18+
19+
def down; end
20+
end

0 commit comments

Comments
 (0)