Skip to content

Commit 826fffb

Browse files
GiteaBotlunny
andauthored
Add missed auto merge feed message on dashboard (#33309) (#33405)
Backport #33309 by @lunny Co-authored-by: Lunny Xiao <[email protected]>
1 parent 2196ba5 commit 826fffb

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Diff for: models/activities/action.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ func (at ActionType) String() string {
7272
case ActionRenameRepo:
7373
return "rename_repo"
7474
case ActionStarRepo:
75-
return "star_repo"
75+
return "star_repo" // will not displayed in feeds.tmpl
7676
case ActionWatchRepo:
77-
return "watch_repo"
77+
return "watch_repo" // will not displayed in feeds.tmpl
7878
case ActionCommitRepo:
7979
return "commit_repo"
8080
case ActionCreateIssue:

Diff for: templates/user/dashboard/feeds.tmpl

+4-1
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,13 @@
7373
{{else if .GetOpType.InActions "publish_release"}}
7474
{{$linkText := .Content | ctx.RenderUtils.RenderEmoji}}
7575
{{ctx.Locale.Tr "action.publish_release" (.GetRepoLink ctx) (printf "%s/releases/tag/%s" (.GetRepoLink ctx) .GetTag) (.ShortRepoPath ctx) $linkText}}
76-
{{else if .GetOpType.InActions "review_dismissed"}}
76+
{{else if .GetOpType.InActions "pull_review_dismissed"}}
7777
{{$index := index .GetIssueInfos 0}}
7878
{{$reviewer := index .GetIssueInfos 1}}
7979
{{ctx.Locale.Tr "action.review_dismissed" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx) $reviewer}}
80+
{{else if .GetOpType.InActions "auto_merge_pull_request"}}
81+
{{$index := index .GetIssueInfos 0}}
82+
{{ctx.Locale.Tr "action.auto_merge_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
8083
{{end}}
8184
{{DateUtils.TimeSince .GetCreate}}
8285
</div>

0 commit comments

Comments
 (0)