Skip to content

Commit ea5b42f

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 089d40a commit ea5b42f

File tree

64 files changed

+1091
-385
lines changed

Some content is hidden

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

64 files changed

+1091
-385
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,6 @@ config/helpers/tailwind/css_in_js.js
126126

127127
# ruby-lsp
128128
.index.yml
129+
130+
# Rubocop cop documentation generation
131+
.yardoc

.gitlab/ci/pages.gitlab-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pages:
1616
- "compile-storybook"
1717
- "update-tests-metadata"
1818
- "generate-frontend-fixtures-mapping"
19+
- "rubocop:docs-site"
1920
before_script:
2021
- apt-get update && apt-get -y install brotli gzip
2122
script:
@@ -24,6 +25,7 @@ pages:
2425
- mkdir -p public/$(dirname "$KNAPSACK_RSPEC_SUITE_REPORT_PATH") public/$(dirname "$FLAKY_RSPEC_SUITE_REPORT_PATH") public/$(dirname "$RSPEC_PACKED_TESTS_MAPPING_PATH") public/$(dirname "$RSPEC_PACKED_TESTS_MAPPING_ALT_PATH") public/$(dirname "$FRONTEND_FIXTURES_MAPPING_PATH")
2526
- mv coverage/ public/coverage-ruby/ || true
2627
- mv coverage-frontend/ public/coverage-frontend/ || true
28+
- mv rubocop/docs-hugo/public/ public/rubocop-docs/ || true
2729
- mv storybook/public public/storybook || true
2830
- cp .public/assets/application-*.css public/application.css || true
2931
- mv $KNAPSACK_RSPEC_SUITE_REPORT_PATH public/$KNAPSACK_RSPEC_SUITE_REPORT_PATH || true

.gitlab/ci/rules.gitlab-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,6 +1274,10 @@
12741274
- <<: *if-default-refs
12751275
changes: *docs-deprecations-and-removals-patterns
12761276

1277+
.docs:rules:rubocop-docs-site:
1278+
rules:
1279+
- <<: *if-dot-com-ee-schedule-default-branch-maintenance
1280+
12771281
##################
12781282
# GraphQL rules #
12791283
##################

.gitlab/ci/static-analysis.gitlab-ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,25 @@ rubocop-docs:
164164
script:
165165
- bundle exec rubocop --only Gitlab/DocumentationLinks/Link
166166

167+
rubocop:docs-site:
168+
extends:
169+
- .static-analysis-base
170+
- .rubocop-job-cache
171+
- .docs:rules:rubocop-docs-site
172+
allow_failure: true
173+
script:
174+
- apt-get update && apt-get -y install hugo
175+
- rake rubocop:docs
176+
- cd rubocop/docs-hugo
177+
- hugo --minify
178+
- cd ../../
179+
artifacts:
180+
name: rubocop-docs-site
181+
expire_in: 31d
182+
when: always
183+
paths:
184+
- rubocop/docs-hugo/public
185+
167186
rails-next-dependency-check:
168187
stage: lint
169188
needs: []

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,8 @@ group :development, :test do
551551
gem 'vite_ruby', '~> 3.9.0', feature_category: :shared
552552

553553
gem 'gitlab-housekeeper', path: 'gems/gitlab-housekeeper', feature_category: :tooling
554+
555+
gem 'yard', '~> 0.9', require: false, feature_category: :tooling
554556
end
555557

556558
group :development, :test, :danger do

Gemfile.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2373,6 +2373,7 @@ DEPENDENCIES
23732373
webrick (~> 1.8.1)
23742374
wikicloth (= 0.8.1)
23752375
yajl-ruby (~> 1.4.3)
2376+
yard (~> 0.9)
23762377

23772378
BUNDLED WITH
23782379
2.6.5

Gemfile.next.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2407,6 +2407,7 @@ DEPENDENCIES
24072407
webrick (~> 1.8.1)
24082408
wikicloth (= 0.8.1)
24092409
yajl-ruby (~> 1.4.3)
2410+
yard (~> 0.9)
24102411

24112412
BUNDLED WITH
24122413
2.6.5

app/assets/javascripts/admin/users/components/actions/delete.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,18 @@ export default {
7878
</script>
7979

8080
<template>
81-
<gl-disclosure-dropdown-item :disabled="loading" :aria-busy="loading" @action="onClick">
81+
<gl-disclosure-dropdown-item
82+
:disabled="loading"
83+
:aria-busy="loading"
84+
:variant="loading ? null : 'danger'"
85+
@action="onClick"
86+
>
8287
<template #list-item>
8388
<div v-if="loading" class="gl-flex gl-items-center">
8489
<gl-loading-icon class="gl-mr-3" />
8590
{{ $options.i18n.loading }}
8691
</div>
87-
<span v-else class="gl-text-red-500">
92+
<span v-else>
8893
<slot></slot>
8994
</span>
9095
</template>

app/assets/javascripts/admin/users/components/actions/delete_with_contributions.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,18 @@ export default {
100100
</script>
101101

102102
<template>
103-
<gl-disclosure-dropdown-item :disabled="loading" :aria-busy="loading" @action="onClick">
103+
<gl-disclosure-dropdown-item
104+
:disabled="loading"
105+
:aria-busy="loading"
106+
:variant="loading ? null : 'danger'"
107+
@action="onClick"
108+
>
104109
<template #list-item>
105110
<div v-if="loading" class="gl-flex gl-items-center">
106111
<gl-loading-icon class="gl-mr-3" />
107112
{{ $options.i18n.loading }}
108113
</div>
109-
<span v-else class="gl-text-red-500">
114+
<span v-else>
110115
<slot></slot>
111116
</span>
112117
</template>

app/assets/javascripts/issues/show/components/header_actions.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,10 @@ export default {
408408
<gl-dropdown-divider />
409409
<gl-disclosure-dropdown-item
410410
v-gl-modal="$options.deleteModalId"
411+
variant="danger"
411412
@action="track('click_dropdown')"
412413
>
413-
<template #list-item>
414-
<span class="gl-text-red-500">{{ deleteButtonText }}</span>
415-
</template>
414+
<template #list-item>{{ deleteButtonText }}</template>
416415
</gl-disclosure-dropdown-item>
417416
</template>
418417
<gl-disclosure-dropdown-item

app/assets/javascripts/issues/show/components/task_list_item_actions.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,13 @@ export default {
6060
{{ s__('WorkItem|Convert to child item') }}
6161
</template>
6262
</gl-disclosure-dropdown-item>
63-
<gl-disclosure-dropdown-item class="!gl-ml-2" data-testid="delete" @action="deleteTaskListItem">
64-
<template #list-item>
65-
<span class="gl-text-red-500">{{ __('Delete') }}</span>
66-
</template>
63+
<gl-disclosure-dropdown-item
64+
class="!gl-ml-2"
65+
data-testid="delete"
66+
variant="danger"
67+
@action="deleteTaskListItem"
68+
>
69+
<template #list-item>{{ __('Delete') }}</template>
6770
</gl-disclosure-dropdown-item>
6871
</gl-disclosure-dropdown>
6972
</template>

app/assets/javascripts/members/components/action_dropdowns/leave_dropdown_item.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ export default {
2727
</script>
2828

2929
<template>
30-
<gl-disclosure-dropdown-item v-gl-modal="$options.modalId">
30+
<gl-disclosure-dropdown-item v-gl-modal="$options.modalId" variant="danger">
3131
<template #list-item>
32-
<span class="gl-text-red-500">
33-
<slot></slot>
34-
</span>
32+
<slot></slot>
3533
<leave-modal :member="member" :permissions="permissions" />
3634
</template>
3735
</gl-disclosure-dropdown-item>

app/assets/javascripts/members/components/action_dropdowns/remove_member_dropdown_item.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,11 @@ export default {
7878
<template>
7979
<gl-disclosure-dropdown-item
8080
data-testid="delete-member-dropdown-item"
81+
variant="danger"
8182
@action="showRemoveMemberModal(modalData)"
8283
>
8384
<template #list-item>
84-
<span class="gl-text-red-500">
85-
<slot></slot>
86-
</span>
85+
<slot></slot>
8786
</template>
8887
</gl-disclosure-dropdown-item>
8988
</template>

app/assets/javascripts/ml/experiment_tracking/components/delete_button.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,7 @@ export default {
7676
:aria-label="actionPrimaryText"
7777
variant="danger"
7878
>
79-
<template #list-item>
80-
<span class="gl-text-red-500">
81-
{{ actionPrimaryText }}
82-
</span>
83-
</template>
79+
<template #list-item>{{ actionPrimaryText }}</template>
8480
</gl-disclosure-dropdown-item>
8581
</gl-disclosure-dropdown>
8682

app/assets/javascripts/packages_and_registries/container_registry/explorer/components/details_page/details_header.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,8 @@ export default {
228228
text-sr-only
229229
no-caret
230230
>
231-
<gl-disclosure-dropdown-item @action="$emit('delete')">
232-
<template #list-item>
233-
<span class="gl-text-red-500">
234-
{{ $options.i18n.DELETE_IMAGE_TEXT }}
235-
</span>
236-
</template>
231+
<gl-disclosure-dropdown-item variant="danger" @action="$emit('delete')">
232+
<template #list-item>{{ $options.i18n.DELETE_IMAGE_TEXT }}</template>
237233
</gl-disclosure-dropdown-item>
238234
</gl-disclosure-dropdown>
239235
</template>

app/assets/javascripts/packages_and_registries/package_registry/components/list/package_list_row.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,13 @@ export default {
202202
text-sr-only
203203
no-caret
204204
>
205-
<gl-disclosure-dropdown-item data-testid="action-delete" @action="$emit('delete')">
205+
<gl-disclosure-dropdown-item
206+
data-testid="action-delete"
207+
variant="danger"
208+
@action="$emit('delete')"
209+
>
206210
<template #list-item>
207-
<span class="gl-text-red-500">
208-
{{ $options.i18n.deletePackage }}
209-
</span>
211+
{{ $options.i18n.deletePackage }}
210212
</template>
211213
</gl-disclosure-dropdown-item>
212214
</gl-disclosure-dropdown>

app/assets/javascripts/work_items/components/notes/work_item_note_actions.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,11 @@ export default {
310310
<gl-disclosure-dropdown-item
311311
v-if="showEdit"
312312
data-testid="delete-note-action"
313+
variant="danger"
313314
@action="emitEvent('deleteNote')"
314315
>
315316
<template #list-item>
316-
<span class="gl-text-red-500">{{ $options.i18n.deleteNoteText }}</span>
317+
{{ $options.i18n.deleteNoteText }}
317318
</template>
318319
</gl-disclosure-dropdown-item>
319320
</gl-disclosure-dropdown-group>

app/models/ci/build.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -759,15 +759,6 @@ def needs_touch?
759759
Time.current - updated_at > 15.minutes.to_i
760760
end
761761

762-
def valid_token?(token)
763-
jwt = ::Ci::JobToken::Jwt.decode(token)
764-
if jwt
765-
jwt.job == self
766-
else
767-
self.token && token.present? && ActiveSupport::SecurityUtils.secure_compare(token, self.token)
768-
end
769-
end
770-
771762
def remove_token!
772763
update!(token_encrypted: nil)
773764
end

app/models/concerns/enums/sbom.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ class Sbom
2222
wolfi: 13,
2323
cargo: 14,
2424
swift: 15,
25-
conda: 16
25+
conda: 16,
26+
pub: 17
2627
}.with_indifferent_access.freeze
2728

2829
REACHABILITY_TYPES = {
@@ -42,6 +43,7 @@ class Sbom
4243
cargo
4344
swift
4445
conda
46+
pub
4547
].freeze
4648

4749
CONTAINER_SCANNING_PURL_TYPES = %w[

app/services/import/source_users/reassign_service.rb

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ def initialize(import_source_user, assignee_user, current_user:)
77
@import_source_user = import_source_user
88
@current_user = current_user
99
@assignee_user = assignee_user
10+
@root_namespace = import_source_user.namespace.root_ancestor
1011
end
1112

1213
def execute
13-
return error_invalid_permissions unless current_user.can?(:admin_import_source_user, import_source_user)
14-
return error_invalid_assignee unless valid_assignee?(assignee_user)
14+
validation_error = run_validations
15+
return validation_error if validation_error.is_a?(ServiceResponse) && validation_error.error?
1516

1617
invalid_status = false
1718
reassign_successful = false
@@ -39,14 +40,33 @@ def execute
3940

4041
private
4142

42-
attr_reader :assignee_user
43+
attr_reader :assignee_user, :root_namespace
4344

4445
def reassign_user
4546
import_source_user.reassign_to_user = assignee_user
4647
import_source_user.reassigned_by_user = current_user
4748
import_source_user.reassign
4849
end
4950

51+
def error_namespace_type
52+
ServiceResponse.error(
53+
message: invalid_namespace_message,
54+
reason: :invalid_namespace,
55+
payload: import_source_user
56+
)
57+
end
58+
59+
def invalid_namespace_message
60+
s_("UserMapping|You cannot reassign user contributions of imports to a personal namespace.")
61+
end
62+
63+
def run_validations
64+
return error_invalid_permissions unless current_user.can?(:admin_import_source_user, import_source_user)
65+
return error_namespace_type if root_namespace.user_namespace?
66+
67+
error_invalid_assignee unless valid_assignee?(assignee_user)
68+
end
69+
5070
def error_invalid_assignee
5171
ServiceResponse.error(
5272
message: invalid_assignee_message,
@@ -81,3 +101,5 @@ def allow_mapping_to_admins?
81101
end
82102
end
83103
end
104+
105+
Import::SourceUsers::ReassignService.prepend_mod

config/feature_flags/gitlab_com_derisk/ci_auth_job_finder_in_runner_api.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

data/deprecations/17-9-DS-for-JS-vendored-libraries.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- title: "Dependency Scanning for JavaScript vendored libraries"
22
# The milestones for the deprecation announcement, and the removal.
3-
removal_milestone: "18.0"
3+
removal_milestone: "19.0"
44
announcement_milestone: "17.9"
55
# Change breaking_change to false if needed.
66
breaking_change: true
@@ -15,7 +15,7 @@
1515
manual_task: true # Can be true or false. Use this to denote whether a resolution action must be performed manually (true), or if it can be automated by using the API or other automation (false).
1616
body: | # (required) Don't change this line.
1717
The [Dependency Scanning for JavaScript vendored libraries](https://docs.gitlab.com/user/application_security/dependency_scanning/#javascript) feature
18-
provided by the Gemnasium analyzer for Dependency Scanning is deprecated in GitLab 17.9 and reaches end of support in GitLab 18.0.
18+
provided by the Gemnasium analyzer for Dependency Scanning is deprecated in GitLab 17.9.
1919
2020
While this functionality will continue to work when using the Gemnasium analyzer, it will not be available after migrating to the new Dependency Scanning analyzer.
2121
See details in [the migration guide](https://docs.gitlab.com/user/application_security/dependency_scanning/migration_guide_to_sbom_based_scans/)
@@ -31,7 +31,7 @@
3131
# 2) Mention `@gitlab-com/support` in this merge request.
3232
#
3333
# When support for this feature ends, in XX.YY milestone format.
34-
end_of_support_milestone: 18.0
34+
end_of_support_milestone:
3535
# Array of tiers the feature is currently available to,
3636
# like [Free, Silver, Gold, Core, Premium, Ultimate]
3737
tiers: Ultimate

0 commit comments

Comments
 (0)