Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Apr 23, 2023
1 parent d131252 commit 5cd6d06
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1622,6 +1622,7 @@ pulls.reopen_to_merge = Please reopen this pull request to perform a merge.
pulls.cant_reopen_deleted_branch = This pull request cannot be reopened because the branch was deleted.
pulls.merged = Merged
pulls.merged_success = Pull request successfully merged and closed
pulls.merged_manually_success = Pull request successfully manually merged as %s and closed
pulls.closed = Pull request closed
pulls.manually_merged = Manually merged
pulls.merged_info_text = The branch %s can now be deleted.
Expand Down
11 changes: 9 additions & 2 deletions templates/repo/issue/view_content/pull.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,16 @@
{{if .Issue.PullRequest.HasMerged}}
<div class="item item-section text gt-f1">
<div class="item-section-left">
<h3 class="gt-mb-3">{{$.locale.Tr "repo.pulls.merged_success"}}</h3>
<h3 class="gt-mb-3">
{{if and (eq $.Issue.PullRequest.Status 3) (.Issue.PullRequest.MergedCommitID)}}
{{$link := printf "%s/commit/%s" $.Repository.Link (.Issue.PullRequest.MergedCommitID | PathEscape)}}
{{$.locale.Tr "repo.pulls.merged_manually_success"}}
{{else}}
{{$.locale.Tr "repo.pulls.merged_success" (printf "<a rel='nofollow' class='ui sha' href='%s'>%s</a>" ($link | Escape) (ShortSha .Issue.PullRequest.MergedCommitID | Escape) | Str2html}}
{{end}}
</h3>
<div class="merge-section-info">
{{$.locale.Tr "repo.pulls.merged_info_text" (printf "<code>%s</code>" .HeadTarget) | Str2html}}
{{$.locale.Tr "repo.pulls.merged_info_text" (printf "<code>%s</code>" (.HeadTarget | Escape) | Str2html}}
</div>
</div>
{{if .IsPullBranchDeletable}}
Expand Down

0 comments on commit 5cd6d06

Please sign in to comment.