Skip to content

Commit a50b8ce

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 1185bb8 commit a50b8ce

File tree

20 files changed

+264
-19
lines changed

20 files changed

+264
-19
lines changed

.rubocop_todo/layout/argument_alignment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Cop supports --autocorrect.
33
Layout/ArgumentAlignment:
44
Exclude:
5-
- 'ee/app/services/ee/keys/create_service.rb'
65
- 'ee/app/services/ee/projects/create_from_template_service.rb'
76
- 'ee/app/services/ee/projects/gitlab_projects_import_service.rb'
87
- 'ee/app/services/ee/search/snippet_service.rb'

GITLAB_KAS_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c4214a8f59358bcca78e06f5e4d5bbb8e19cc03b
1+
eee36c7f647a6ecbc1398349520fce14a021008e
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# frozen_string_literal: true
2+
3+
module Mutations
4+
module Branches # rubocop:disable Gitlab/BoundedContexts -- Existing module
5+
class Delete < BaseMutation
6+
graphql_name 'BranchDelete'
7+
8+
include FindsProject
9+
10+
argument :project_path, GraphQL::Types::ID,
11+
required: true,
12+
description: 'Project full path the branch is associated with.'
13+
14+
argument :name, GraphQL::Types::String,
15+
required: true,
16+
description: 'Name of the branch.'
17+
18+
field :branch,
19+
Types::BranchType,
20+
null: true,
21+
description: 'Branch after mutation.'
22+
23+
authorize :push_code
24+
25+
def resolve(project_path:, name:)
26+
project = authorized_find!(project_path)
27+
28+
result = ::Branches::DeleteService.new(project, current_user).execute(name)
29+
30+
{
31+
branch: (result.payload[:branch] if result.error?),
32+
errors: result.errors
33+
}
34+
end
35+
end
36+
end
37+
end

app/graphql/types/mutation_type.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class MutationType < BaseObject
4040
mount_mutation Mutations::Boards::Lists::Update
4141
mount_mutation Mutations::Boards::Lists::Destroy
4242
mount_mutation Mutations::Branches::Create, calls_gitaly: true
43+
mount_mutation Mutations::Branches::Delete, calls_gitaly: true
4344
mount_mutation Mutations::Clusters::Agents::Create
4445
mount_mutation Mutations::Clusters::Agents::Delete
4546
mount_mutation Mutations::Clusters::AgentTokens::Create

app/models/diff_note.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,17 @@ def shas
131131
end
132132
end
133133

134+
def latest_diff_file_path
135+
latest_diff_file.file_path
136+
end
137+
138+
def raw_truncated_diff_lines
139+
discussion
140+
.truncated_diff_lines(highlight: false)
141+
.map(&:text)
142+
.join("\n")
143+
end
144+
134145
private
135146

136147
def enqueue_diff_file_creation_job

app/services/branches/delete_service.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ def execute(branch_name)
2424
ServiceResponse.success(message: 'Branch was deleted')
2525
else
2626
ServiceResponse.error(
27+
payload: { branch: branch },
2728
message: 'Failed to remove branch',
2829
http_status: 400)
2930
end
3031
rescue Gitlab::Git::PreReceiveError, Gitlab::Git::CommandError => ex
31-
ServiceResponse.error(message: ex.message, http_status: 400)
32+
ServiceResponse.error(payload: { branch: branch }, message: ex.message, http_status: 400)
3233
end
3334

3435
private

config/sidekiq_queues.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,8 @@
541541
- 1
542542
- - merge_requests_delete_source_branch
543543
- 1
544+
- - merge_requests_duo_code_review_chat
545+
- 1
544546
- - merge_requests_execute_approval_hooks
545547
- 1
546548
- - merge_requests_fetch_suggested_reviewers
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
- title: "Updated tooling to release CI/CD components to the Catalog"
2+
announcement_milestone: "17.7"
3+
removal_milestone: "18.0"
4+
breaking_change: true
5+
reporter: dhershkovitch
6+
stage: verify
7+
issue_url: https://gitlab.com/groups/gitlab-org/-/epics/12788
8+
window: 3 # Can be 1, 2, or 3 - The window when the breaking change will be deployed on GitLab.com
9+
# Use the impact calculator https://gitlab-com.gitlab.io/gl-infra/breaking-change-impact-calculator/?
10+
impact: high # Can be one of: [critical, high, medium, low]
11+
scope: # Can be one or a combination of: [instance, group, project]
12+
resolution_role: Developer # Can be one of: [Admin, Owner, Maintainer, Developer]
13+
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).
14+
body: | # (required) Don't change this line.
15+
Starting in GitLab 18.0, the internal process that releases CI/CD components to the Catalog will be changed.
16+
If you use the [recommended CI/CD component release process](https://docs.gitlab.com/ee/ci/components/#publish-a-new-release), which makes use of the `release` keyword and the `registry.gitlab.com/gitlab-org/release-cli:latest` container image, you do not need to make any changes.
17+
The `latest` version of this container image (`v0.20.0`) contains [GLab](https://gitlab.com/gitlab-org/cli/) `v1.50.0`, which will be used for all releases to the CI/CD Catalog in GitLab 18.0 and later.
18+
In other cases:
19+
20+
- If you need to pin the container image to a specific version, use `v0.20.0` or later (`registry.gitlab.com/gitlab-org/release-cli:v0.20.0`),
21+
to ensure GLab is available for the release process.
22+
- If you've manually installed the Release CLI tool on your runners, you must install GLab `v1.50.0` or later on those runners.
23+
24+
# ==============================
25+
# OPTIONAL END-OF-SUPPORT FIELDS
26+
# ==============================
27+
#
28+
# If an End of Support period applies:
29+
# 1) Share this announcement in the `#spt_managers` Support channel in Slack
30+
# 2) Mention `@gitlab-com/support` in this merge request.
31+
#
32+
# When support for this feature ends, in XX.YY milestone format.
33+
end_of_support_milestone:
34+
# Array of tiers the feature is currently available to,
35+
# like [Free, Silver, Gold, Core, Premium, Ultimate]
36+
tiers:
37+
# Links to documentation and thumbnail image
38+
documentation_url:
39+
image_url:
40+
# Use the youtube thumbnail URL with the structure of https://img.youtube.com/vi/UNIQUEID/hqdefault.jpg
41+
video_url:

doc/api/graphql/reference/index.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2784,6 +2784,26 @@ Input type: `BoardListUpdateLimitMetricsInput`
27842784
| <a id="mutationboardlistupdatelimitmetricserrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
27852785
| <a id="mutationboardlistupdatelimitmetricslist"></a>`list` | [`BoardList`](#boardlist) | Updated list. |
27862786

2787+
### `Mutation.branchDelete`
2788+
2789+
Input type: `BranchDeleteInput`
2790+
2791+
#### Arguments
2792+
2793+
| Name | Type | Description |
2794+
| ---- | ---- | ----------- |
2795+
| <a id="mutationbranchdeleteclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
2796+
| <a id="mutationbranchdeletename"></a>`name` | [`String!`](#string) | Name of the branch. |
2797+
| <a id="mutationbranchdeleteprojectpath"></a>`projectPath` | [`ID!`](#id) | Project full path the branch is associated with. |
2798+
2799+
#### Fields
2800+
2801+
| Name | Type | Description |
2802+
| ---- | ---- | ----------- |
2803+
| <a id="mutationbranchdeletebranch"></a>`branch` | [`Branch`](#branch) | Branch after mutation. |
2804+
| <a id="mutationbranchdeleteclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
2805+
| <a id="mutationbranchdeleteerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
2806+
27872807
### `Mutation.branchRuleApprovalProjectRuleCreate`
27882808

27892809
DETAILS:

doc/update/breaking_windows.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,6 @@ This window takes place on May 5 - 7, 2025 from 09:00 UTC to 22:00 UTC.
7474
| [`ciJobTokenScopeAddProject` GraphQL mutation is deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/474175) | Low | Govern | Project |
7575
| [Guest users can pull packages from private projects on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/336622) | High | Package | Project |
7676
| [Removal of `migrationState` field in `ContainerRepository` GraphQL API](https://gitlab.com/gitlab-org/gitlab/-/issues/459869) | Low | Package | Project |
77+
| [Updated tooling to release CI/CD components to the Catalog](https://gitlab.com/groups/gitlab-org/-/epics/12788) | High | Verify | |
7778
| [Increased default security for use of pipeline variables](https://gitlab.com/gitlab-org/gitlab/-/issues/502382) | Medium | Verify | Project |
7879
| [Remove `previousStageJobsOrNeeds` from GraphQL](https://gitlab.com/gitlab-org/gitlab/-/issues/424417) | | Verify | |

0 commit comments

Comments
 (0)