Skip to content

Commit d7efc1e

Browse files
committed
Fix bug
1 parent d139e94 commit d7efc1e

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

routers/web/repo/pull.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,6 @@ func PrepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *git.C
432432
ctx.Data["GetCommitMessages"] = pull_service.GetSquashMergeCommitMessages(ctx, pull)
433433
} else {
434434
ctx.Data["GetCommitMessages"] = ""
435-
ctx.Data["HeadBranchNotExist"] = true
436435
}
437436

438437
sha, err := baseGitRepo.GetRefCommitID(pull.GetGitRefName())

templates/repo/issue/view_title.tmpl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,12 @@
5656
{{if .Issue.IsPull}}
5757
{{$headHref := .HeadTarget}}
5858
{{if .HeadBranchLink}}
59-
{{if .HeadBranchNotExist}}
60-
{{$headHref = HTMLFormat `<span class="tw-line-through" data-tooltip-content="%s">%s</span>` (ctx.Locale.Tr "form.target_branch_not_exist") $headHref}}
61-
{{else}}
62-
{{$headHref = HTMLFormat `<a href="%s">%s</a> <button class="btn interact-fg" data-tooltip-content="%s" data-clipboard-text="%s">%s</button>` .HeadBranchLink $headHref (ctx.Locale.Tr "copy_branch") .HeadTarget (svg "octicon-copy" 14)}}
63-
{{end}}
59+
{{$headHref = HTMLFormat `<a href="%s">%s</a> <button class="btn interact-fg" data-tooltip-content="%s" data-clipboard-text="%s">%s</button>` .HeadBranchLink $headHref (ctx.Locale.Tr "copy_branch") .HeadTarget (svg "octicon-copy" 14)}}
6460
{{else}}
6561
{{if .Issue.PullRequest.IsAgitFlow}}
6662
{{$headHref = HTMLFormat `%s <a href="%s" target="_blank"><span class="ui label basic tiny" data-tooltip-content="%s">AGit</span></a>` $headHref "https://docs.gitea.com/usage/agit" (ctx.Locale.Tr "repo.pull.agit_documentation")}}
6763
{{else}}
68-
{{$headHref = HTMLFormat `<span data-tooltip-content="%s">%s</span>` (ctx.Locale.Tr "form.target_branch_not_exist") $headHref}}
64+
{{$headHref = HTMLFormat `<span class="tw-line-through" data-tooltip-content="%s">%s</span>` (ctx.Locale.Tr "form.target_branch_not_exist") $headHref}}
6965
{{end}}
7066
{{end}}
7167
{{$baseHref := .BaseTarget}}

0 commit comments

Comments
 (0)