Skip to content

Commit 263d06f

Browse files
yardenshohamlunny
andauthored
Fix wrong hint when deleting a branch successfully from pull request UI (#22673) (#22698)
Backport #22673 Fix #18785 Co-authored-by: Lunny Xiao <[email protected]>
1 parent 6dc16c1 commit 263d06f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

routers/web/repo/pull.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ func CleanUpPullRequest(ctx *context.Context) {
13811381
}
13821382

13831383
func deleteBranch(ctx *context.Context, pr *issues_model.PullRequest, gitRepo *git.Repository) {
1384-
fullBranchName := pr.HeadRepo.Owner.Name + "/" + pr.HeadBranch
1384+
fullBranchName := pr.HeadRepo.FullName() + ":" + pr.HeadBranch
13851385
if err := repo_service.DeleteBranch(ctx.Doer, pr.HeadRepo, gitRepo, pr.HeadBranch); err != nil {
13861386
switch {
13871387
case git.IsErrBranchNotExist(err):

tests/integration/pull_merge_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func TestPullCleanUpAfterMerge(t *testing.T) {
187187
htmlDoc := NewHTMLParser(t, resp.Body)
188188
resultMsg := htmlDoc.doc.Find(".ui.message>p").Text()
189189

190-
assert.EqualValues(t, "Branch 'user1/feature/test' has been deleted.", resultMsg)
190+
assert.EqualValues(t, "Branch 'user1/repo1:feature/test' has been deleted.", resultMsg)
191191
})
192192
}
193193

0 commit comments

Comments
 (0)