2023-07-31 22:13:42 +00:00
|
|
|
<div id="activity-feed" class="flex-list">
|
|
|
|
{{range .Feeds}}
|
|
|
|
<div class="flex-item">
|
|
|
|
<div class="flex-item-leading">
|
2023-08-10 03:19:39 +00:00
|
|
|
{{ctx.AvatarUtils.AvatarByAction .}}
|
2023-07-31 22:13:42 +00:00
|
|
|
</div>
|
|
|
|
<div class="flex-item-main gt-gap-3">
|
|
|
|
<div>
|
|
|
|
{{if gt .ActUser.ID 0}}
|
2023-09-29 13:35:01 +00:00
|
|
|
<a href="{{AppSubUrl}}/{{(.GetActUserName ctx) | PathEscape}}" title="{{.GetDisplayNameTitle ctx}}">{{.GetDisplayName ctx}}</a>
|
2023-07-31 22:13:42 +00:00
|
|
|
{{else}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{.ShortActUserName ctx}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{end}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{if .GetOpType.InActions "create_repo"}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.create_repo" ((.GetRepoLink ctx)|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "rename_repo"}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.rename_repo" (.GetContent|Escape) ((.GetRepoLink ctx)|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "commit_repo"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{if .Content}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.commit_repo" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (Escape .GetBranch) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2019-03-27 22:22:39 +00:00
|
|
|
{{else}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.create_branch" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (Escape .GetBranch) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2015-12-07 22:30:52 +00:00
|
|
|
{{end}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "create_issue"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{$index := index .GetIssueInfos 0}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.create_issue" ((printf "%s/issues/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "create_pull_request"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{$index := index .GetIssueInfos 0}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.create_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "transfer_repo"}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.transfer_repo" .GetContent ((.GetRepoLink ctx)|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "push_tag"}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.push_tag" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (.GetTag|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "comment_issue"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{$index := index .GetIssueInfos 0}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.comment_issue" ((printf "%s/issues/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "merge_pull_request"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{$index := index .GetIssueInfos 0}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.merge_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "close_issue"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{$index := index .GetIssueInfos 0}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.close_issue" ((printf "%s/issues/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "reopen_issue"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{$index := index .GetIssueInfos 0}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.reopen_issue" ((printf "%s/issues/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "close_pull_request"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{$index := index .GetIssueInfos 0}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.close_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "reopen_pull_request"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{$index := index .GetIssueInfos 0}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.reopen_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "delete_tag"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{$index := index .GetIssueInfos 0}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.delete_tag" ((.GetRepoLink ctx)|Escape) (.GetTag|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "delete_branch"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{$index := index .GetIssueInfos 0}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.delete_branch" ((.GetRepoLink ctx)|Escape) (.GetBranch|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "mirror_sync_push"}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.mirror_sync_push" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (.GetBranch|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "mirror_sync_create"}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.mirror_sync_create" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (.GetBranch|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "mirror_sync_delete"}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.mirror_sync_delete" ((.GetRepoLink ctx)|Escape) (.GetBranch|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "approve_pull_request"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{$index := index .GetIssueInfos 0}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.approve_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "reject_pull_request"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{$index := index .GetIssueInfos 0}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.reject_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "comment_pull"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{$index := index .GetIssueInfos 0}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.comment_pull" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "publish_release"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{$linkText := .Content | RenderEmoji $.Context}}
|
2023-10-01 09:54:58 +00:00
|
|
|
{{ctx.Locale.Tr "action.publish_release" ((.GetRepoLink ctx)|Escape) ((printf "%s/releases/tag/%s" (.GetRepoLink ctx) .GetTag)|Escape) ((.ShortRepoPath ctx)|Escape) $linkText | Str2html}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "review_dismissed"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
{{$index := index .GetIssueInfos 0}}
|
|
|
|
{{$reviewer := index .GetIssueInfos 1}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{ctx.Locale.Tr "action.review_dismissed" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) $reviewer | Str2html}}
|
2015-12-07 22:30:52 +00:00
|
|
|
{{end}}
|
2023-10-21 11:13:15 +00:00
|
|
|
{{TimeSince .GetCreate ctx.Locale}}
|
2015-12-07 22:30:52 +00:00
|
|
|
</div>
|
2023-09-07 14:23:13 +00:00
|
|
|
{{if .GetOpType.InActions "commit_repo" "mirror_sync_push"}}
|
2023-08-23 04:23:30 +00:00
|
|
|
{{$push := ActionContent2Commits .}}
|
2023-09-29 13:35:01 +00:00
|
|
|
{{$repoLink := (.GetRepoLink ctx)}}
|
2023-10-21 11:13:15 +00:00
|
|
|
<div class="gt-df gt-fc gt-gap-2">
|
|
|
|
{{range $push.Commits}}
|
|
|
|
{{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
|
|
|
|
<div class="flex-text-block">
|
|
|
|
<img class="ui avatar" src="{{$push.AvatarLink $.Context .AuthorEmail}}" title="{{.AuthorName}}" width="16" height="16">
|
|
|
|
<a class="ui sha label" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
|
|
|
|
<span class="text truncate">
|
|
|
|
{{RenderCommitMessage $.Context .Message $repoLink $.ComposeMetas}}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2023-08-23 04:23:30 +00:00
|
|
|
{{if and (gt $push.Len 1) $push.CompareURL}}
|
2023-09-25 13:15:51 +00:00
|
|
|
<a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{ctx.Locale.Tr "action.compare_commits" $push.Len}} »</a>
|
2023-08-23 04:23:30 +00:00
|
|
|
{{end}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "create_issue"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span>
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "create_pull_request"}}
|
2023-07-31 22:13:42 +00:00
|
|
|
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span>
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "comment_issue" "approve_pull_request" "reject_pull_request" "comment_pull"}}
|
2023-09-29 13:35:01 +00:00
|
|
|
<a href="{{.GetCommentLink ctx}}" class="text truncate issue title">{{(.GetIssueTitle ctx) | RenderEmoji $.Context | RenderCodeBlock}}</a>
|
2023-07-31 22:13:42 +00:00
|
|
|
{{$comment := index .GetIssueInfos 1}}
|
|
|
|
{{if gt (len $comment) 0}}
|
2023-10-21 11:13:15 +00:00
|
|
|
<div class="markup gt-font-14">{{RenderMarkdownToHtml ctx $comment}}</div>
|
2023-07-31 22:13:42 +00:00
|
|
|
{{end}}
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "merge_pull_request"}}
|
2023-10-21 10:29:06 +00:00
|
|
|
<div class="flex-item-body text black">{{index .GetIssueInfos 1}}</div>
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "close_issue" "reopen_issue" "close_pull_request" "reopen_pull_request"}}
|
2023-09-29 13:35:01 +00:00
|
|
|
<span class="text truncate issue title">{{(.GetIssueTitle ctx) | RenderEmoji $.Context | RenderCodeBlock}}</span>
|
2023-09-07 14:23:13 +00:00
|
|
|
{{else if .GetOpType.InActions "pull_review_dismissed"}}
|
2023-10-21 10:29:06 +00:00
|
|
|
<div class="flex-item-body text black">{{ctx.Locale.Tr "action.review_dismissed_reason"}}</div>
|
|
|
|
<div class="flex-item-body text black">{{index .GetIssueInfos 2 | RenderEmoji $.Context}}</div>
|
2023-07-31 22:13:42 +00:00
|
|
|
{{end}}
|
2015-12-07 22:30:52 +00:00
|
|
|
</div>
|
2023-07-31 22:13:42 +00:00
|
|
|
<div class="flex-item-trailing">
|
2023-08-31 21:28:45 +00:00
|
|
|
{{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32 "text grey gt-mr-2"}}
|
2015-12-07 22:30:52 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-07-31 22:13:42 +00:00
|
|
|
{{end}}
|
|
|
|
{{template "base/paginate" .}}
|
|
|
|
</div>
|