detached e9394b7

feat(api): let a merge delete the source branch

commit
e9394b717bc2afe3b4ef998d8c4df50aca16bc6a
author
brice · · 2026-10-11 05:29 UTC
parent
303f037
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +45 -9
M gen/ermite/merge_request.pb.go +35 -9 generated file: collapsed
M proto/ermite/merge_request.proto +10 -0
@@ -345,6 +345,12 @@ message MergeMergeRequestRequest {
345345 // MergeRequest.head_id it was shown. Required. The merge happens only if the
346346 // source branch still points to it.
347347 string head_id = 4;
348+ // DeleteSourceBranch deletes the source branch after the merge. The merge
349+ // is refused before anything changes when the source branch is the default
350+ // branch of the repository or the source or target of another open merge
351+ // request. Servers without the "merge_requests.delete_branch" feature ignore
352+ // it.
353+ bool delete_source_branch = 5;
348354 }
349355
350356 // MergeMergeRequestResponse holds the merged merge request.
@@ -353,6 +359,10 @@ message MergeMergeRequestResponse {
353359 // merged_commit_id set to the new tip of the target branch and merge_mode
354360 // set to the mode used.
355361 MergeRequest merge_request = 1;
362+ // SourceBranchDeleted is true when delete_source_branch was set and the
363+ // branch is gone. It is false when the deletion failed after the merge (the
364+ // branch moved in between, say): the merge stands and the branch is kept.
365+ bool source_branch_deleted = 2;
356366 }
357367
358368 // MarkReadRequest records a read position.
@@ -345,6 +345,12 @@ message MergeMergeRequestRequest {
345 // MergeRequest.head_id it was shown. Required. The merge happens only if the345 // MergeRequest.head_id it was shown. Required. The merge happens only if the
346 // source branch still points to it.346 // source branch still points to it.
347 string head_id = 4;347 string head_id = 4;
348+ // DeleteSourceBranch deletes the source branch after the merge. The merge
349+ // is refused before anything changes when the source branch is the default
350+ // branch of the repository or the source or target of another open merge
351+ // request. Servers without the "merge_requests.delete_branch" feature ignore
352+ // it.
353+ bool delete_source_branch = 5;
348 }354 }
349 355
350 // MergeMergeRequestResponse holds the merged merge request.356 // MergeMergeRequestResponse holds the merged merge request.
@@ -353,6 +359,10 @@ message MergeMergeRequestResponse {
353 // merged_commit_id set to the new tip of the target branch and merge_mode359 // merged_commit_id set to the new tip of the target branch and merge_mode
354 // set to the mode used.360 // set to the mode used.
355 MergeRequest merge_request = 1;361 MergeRequest merge_request = 1;
362+ // SourceBranchDeleted is true when delete_source_branch was set and the
363+ // branch is gone. It is false when the deletion failed after the merge (the
364+ // branch moved in between, say): the merge stands and the branch is kept.
365+ bool source_branch_deleted = 2;
356 }366 }
357 367
358 // MarkReadRequest records a read position.368 // MarkReadRequest records a read position.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 18

↑↓ moveenter openesc close