mirror of https://github.com/go-gitea/gitea
follow 26257
This commit is contained in:
parent
a641d84bb1
commit
2e93f87122
|
@ -404,7 +404,7 @@ type FindRecentlyPushedNewBranchesOptions struct {
|
|||
type RecentlyPushedNewBranch struct {
|
||||
BranchName string
|
||||
BranchCompareURL string
|
||||
UpdatedUnix timeutil.TimeStamp
|
||||
CommitTime timeutil.TimeStamp
|
||||
}
|
||||
|
||||
// FindRecentlyPushedNewBranches return at most 2 new branches pushed by the user in 6 hours which has no opened PRs created
|
||||
|
@ -485,7 +485,7 @@ func FindRecentlyPushedNewBranches(ctx context.Context, opts *FindRecentlyPushed
|
|||
newBranches = append(newBranches, &RecentlyPushedNewBranch{
|
||||
BranchName: branchName,
|
||||
BranchCompareURL: branch.Repo.ComposeBranchCompareURL(opts.BaseRepo, branch.Name),
|
||||
UpdatedUnix: branch.UpdatedUnix,
|
||||
CommitTime: branch.CommitTime,
|
||||
})
|
||||
}
|
||||
return newBranches, nil
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="ui positive message gt-df gt-ac">
|
||||
<div class="gt-f1">
|
||||
{{$timeSince := TimeSince .CommitTime.AsTime $.locale}}
|
||||
{{$.locale.Tr "repo.pulls.recently_pushed_new_branches" (PathEscapeSegments .Name) $timeSince | Safe}}
|
||||
{{$.locale.Tr "repo.pulls.recently_pushed_new_branches" .BranchName $timeSince | Safe}}
|
||||
</div>
|
||||
<a aria-role="button" class="ui compact positive button gt-m-0" href="{{.BranchCompareURL}}">
|
||||
{{$.locale.Tr "repo.pulls.compare_changes"}}
|
||||
|
|
Loading…
Reference in New Issue