2022-08-31 21:28:54 +05:30
|
|
|
{{template "base/alert"}}
|
2017-03-17 11:27:43 +05:30
|
|
|
{{range .Issue.Comments}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if call $.ShouldShowCommentType .Type}}
|
2023-09-25 18:12:40 +05:30
|
|
|
{{$createdStr:= TimeSinceUnix .CreatedUnix ctx.Locale}}
|
2017-03-17 11:27:43 +05:30
|
|
|
|
2022-01-21 23:29:26 +05:30
|
|
|
<!-- 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE_REF, 4 = COMMIT_REF,
|
2023-11-08 00:15:06 +05:30
|
|
|
5 = COMMENT_REF, 6 = PULL_REF, 7 = COMMENT_LABEL, 8 = MILESTONE_CHANGE,
|
|
|
|
9 = ASSIGNEES_CHANGE, 10 = TITLE_CHANGE, 11 = DELETE_BRANCH, 12 = START_TRACKING,
|
2022-01-21 23:29:26 +05:30
|
|
|
13 = STOP_TRACKING, 14 = ADD_TIME_MANUAL, 16 = ADDED_DEADLINE, 17 = MODIFIED_DEADLINE,
|
|
|
|
18 = REMOVED_DEADLINE, 19 = ADD_DEPENDENCY, 20 = REMOVE_DEPENDENCY, 21 = CODE,
|
|
|
|
22 = REVIEW, 23 = ISSUE_LOCKED, 24 = ISSUE_UNLOCKED, 25 = TARGET_BRANCH_CHANGED,
|
|
|
|
26 = DELETE_TIME_MANUAL, 27 = REVIEW_REQUEST, 28 = MERGE_PULL_REQUEST,
|
|
|
|
29 = PULL_PUSH_EVENT, 30 = PROJECT_CHANGED, 31 = PROJECT_BOARD_CHANGED
|
2022-05-07 22:35:52 +05:30
|
|
|
32 = DISMISSED_REVIEW, 33 = COMMENT_TYPE_CHANGE_ISSUE_REF, 34 = PR_SCHEDULE_TO_AUTO_MERGE,
|
2023-05-25 18:47:19 +05:30
|
|
|
35 = CANCEL_SCHEDULED_AUTO_MERGE_PR, 36 = PIN_ISSUE, 37 = UNPIN_ISSUE -->
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if eq .Type 0}}
|
|
|
|
<div class="timeline-item comment" id="{{.HashTag}}">
|
2022-08-31 21:28:54 +05:30
|
|
|
{{if .OriginalAuthor}}
|
2023-05-14 19:45:59 +05:30
|
|
|
<span class="timeline-avatar">
|
2024-02-02 15:31:11 +05:30
|
|
|
{{ctx.AvatarUtils.Avatar nil 40}}
|
2023-05-14 19:45:59 +05:30
|
|
|
</span>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else}}
|
2022-09-03 15:03:34 +05:30
|
|
|
<a class="timeline-avatar"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{ctx.AvatarUtils.Avatar .Poster 40}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</a>
|
|
|
|
{{end}}
|
|
|
|
<div class="content comment-container">
|
2023-02-23 07:54:24 +05:30
|
|
|
<div class="ui top attached header comment-header gt-df gt-ac gt-sb" role="heading" aria-level="3">
|
2023-02-13 23:29:59 +05:30
|
|
|
<div class="comment-header-left gt-df gt-ac">
|
2022-08-31 21:28:54 +05:30
|
|
|
{{if .OriginalAuthor}}
|
2023-05-22 05:07:32 +05:30
|
|
|
<span class="text black gt-font-semibold gt-mr-2">
|
2022-01-21 23:29:26 +05:30
|
|
|
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
|
2022-08-31 21:28:54 +05:30
|
|
|
{{.OriginalAuthor}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2024-02-25 19:32:20 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}} {{if $.Repository.OriginalURL}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
<span class="text migrate">
|
2024-02-25 19:32:20 +05:30
|
|
|
({{ctx.Locale.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname}}){{end}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
{{else}}
|
Improve UI on mobile (#19546)
Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience.
- Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row.
- The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that.
- The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row.
- The notification table will now be show a scrollbar instead of overflow.
- The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high.
- The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile.
- Fixes to not overflow the tables but instead force them to be scrollable.
- When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
2022-05-01 21:41:21 +05:30
|
|
|
{{if gt .Poster.ID 0}}
|
|
|
|
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
|
2023-08-10 08:49:39 +05:30
|
|
|
{{ctx.AvatarUtils.Avatar .Poster 24}}
|
Improve UI on mobile (#19546)
Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience.
- Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row.
- The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that.
- The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row.
- The notification table will now be show a scrollbar instead of overflow.
- The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high.
- The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile.
- Fixes to not overflow the tables but instead force them to be scrollable.
- When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
2022-05-01 21:41:21 +05:30
|
|
|
</a>
|
|
|
|
{{end}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-11-19 09:32:30 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-25 19:32:20 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2023-02-13 23:29:59 +05:30
|
|
|
<div class="comment-header-right actions gt-df gt-ac">
|
2023-08-22 11:00:33 +05:30
|
|
|
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if not $.Repository.IsArchived}}
|
2023-04-08 18:45:22 +05:30
|
|
|
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
2023-09-23 17:01:54 +05:30
|
|
|
{{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" . "delete" true "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</div>
|
2020-10-31 18:47:52 +05:30
|
|
|
</div>
|
2023-02-23 07:54:24 +05:30
|
|
|
<div class="ui attached segment comment-body" role="article">
|
2022-01-21 23:29:26 +05:30
|
|
|
<div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission (and $.IsSigned (eq $.SignedUserID .PosterID))}}data-can-edit="true"{{end}}>
|
|
|
|
{{if .RenderedContent}}
|
2024-03-01 12:41:51 +05:30
|
|
|
{{.RenderedContent}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
|
|
|
</div>
|
2023-02-19 09:36:14 +05:30
|
|
|
<div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div>
|
2023-04-20 12:09:44 +05:30
|
|
|
<div class="edit-content-zone gt-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if .Attachments}}
|
2024-03-05 10:29:16 +05:30
|
|
|
{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
|
2017-03-17 11:27:43 +05:30
|
|
|
{{end}}
|
|
|
|
</div>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{$reactions := .Reactions.GroupByType}}
|
|
|
|
{{if $reactions}}
|
2023-05-28 07:04:18 +05:30
|
|
|
{{template "repo/issue/view_content/reactions" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
|
2021-04-11 09:16:37 +05:30
|
|
|
{{end}}
|
2017-03-17 11:27:43 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else if eq .Type 1}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
2024-03-09 02:32:05 +05:30
|
|
|
<span class="badge tw-bg-green tw-text-white">{{svg "octicon-dot-fill"}}</span>
|
2024-02-26 09:38:21 +05:30
|
|
|
{{if not .OriginalAuthor}}
|
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
|
|
|
{{end}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2024-02-26 09:38:21 +05:30
|
|
|
{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
|
2022-08-31 21:28:54 +05:30
|
|
|
{{if .Issue.IsPull}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.pulls.reopened_at" .EventTag $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.reopened_at" .EventTag $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
|
|
|
</span>
|
2019-09-20 11:15:38 +05:30
|
|
|
</div>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else if eq .Type 2}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
2024-03-09 02:32:05 +05:30
|
|
|
<span class="badge tw-bg-red tw-text-white">{{svg "octicon-circle-slash"}}</span>
|
2024-02-26 09:38:21 +05:30
|
|
|
{{if not .OriginalAuthor}}
|
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
|
|
|
{{end}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2024-02-26 09:38:21 +05:30
|
|
|
{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
|
2022-08-31 21:28:54 +05:30
|
|
|
{{if .Issue.IsPull}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.pulls.closed_at" .EventTag $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.closed_at" .EventTag $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
|
|
|
</span>
|
2017-03-17 11:27:43 +05:30
|
|
|
</div>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else if eq .Type 28}}
|
2020-04-11 03:31:41 +05:30
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
2024-03-09 02:32:05 +05:30
|
|
|
<span class="badge tw-bg-purple tw-text-white">{{svg "octicon-git-merge"}}</span>
|
2024-02-26 09:38:21 +05:30
|
|
|
{{if not .OriginalAuthor}}
|
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
|
|
|
{{end}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2024-02-26 09:38:21 +05:30
|
|
|
{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
|
2023-02-06 23:39:18 +05:30
|
|
|
{{$link := printf "%s/commit/%s" $.Repository.Link ($.Issue.PullRequest.MergedCommitID|PathEscape)}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if eq $.Issue.PullRequest.Status 3}}
|
2024-02-25 16:15:56 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.comment_manually_pull_merged_at" (HTMLFormat `<a class="ui sha" href="%[1]s"><b>%[2]s</b></a>` $link (ShortSha $.Issue.PullRequest.MergedCommitID)) (HTMLFormat "<b>%[1]s</b>" $.BaseTarget) $createdStr}}
|
2020-10-26 03:19:48 +05:30
|
|
|
{{else}}
|
2024-02-25 16:15:56 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.comment_pull_merged_at" (HTMLFormat `<a class="ui sha" href="%[1]s"><b>%[2]s</b></a>` $link (ShortSha $.Issue.PullRequest.MergedCommitID)) (HTMLFormat "<b>%[1]s</b>" $.BaseTarget) $createdStr}}
|
2020-10-26 03:19:48 +05:30
|
|
|
{{end}}
|
2020-04-19 05:45:07 +05:30
|
|
|
</span>
|
2017-03-17 11:27:43 +05:30
|
|
|
</div>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else if eq .Type 3 5 6}}
|
2022-08-31 21:28:54 +05:30
|
|
|
{{$refFrom:= ""}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if ne .RefRepoID .Issue.RepoID}}
|
2024-02-25 19:32:20 +05:30
|
|
|
{{$refFrom = ctx.Locale.Tr "repo.issues.ref_from" .RefRepo.FullName}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
2022-08-31 21:28:54 +05:30
|
|
|
{{$refTr := "repo.issues.ref_issue_from"}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if .Issue.IsPull}}
|
2022-08-31 21:28:54 +05:30
|
|
|
{{$refTr = "repo.issues.ref_pull_from"}}
|
|
|
|
{{else if eq .RefAction 1}}
|
|
|
|
{{$refTr = "repo.issues.ref_closing_from"}}
|
|
|
|
{{else if eq .RefAction 2}}
|
|
|
|
{{$refTr = "repo.issues.ref_reopening_from"}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
2023-09-25 18:12:40 +05:30
|
|
|
{{$createdStr:= TimeSinceUnix .CreatedUnix ctx.Locale}}
|
2022-01-21 23:29:26 +05:30
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-bookmark"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if eq .RefAction 3}}<del>{{end}}
|
2022-11-19 09:32:30 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-25 19:32:20 +05:30
|
|
|
{{ctx.Locale.Tr $refTr .EventTag $createdStr (.RefCommentLink ctx) $refFrom}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
{{if eq .RefAction 3}}</del>{{end}}
|
|
|
|
|
|
|
|
<div class="detail">
|
2023-09-29 17:42:54 +05:30
|
|
|
<span class="text grey muted-links"><a href="{{.RefIssueLink ctx}}"><b>{{.RefIssueTitle ctx}}</b> {{.RefIssueIdent ctx}}</a></span>
|
2022-01-21 23:29:26 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 4}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-bookmark"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-01-29 00:47:46 +05:30
|
|
|
{{if .Issue.IsPull}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.pulls.commit_ref_at" .EventTag $createdStr}}
|
2024-01-29 00:47:46 +05:30
|
|
|
{{else}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.commit_ref_at" .EventTag $createdStr}}
|
2024-01-29 00:47:46 +05:30
|
|
|
{{end}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
<div class="detail">
|
|
|
|
{{svg "octicon-git-commit"}}
|
2024-03-01 15:46:19 +05:30
|
|
|
<span class="text grey muted-links">{{.Content | SanitizeHTML}}</span>
|
2022-01-21 23:29:26 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 7}}
|
|
|
|
{{if or .AddedLabels .RemovedLabels}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-tag"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if and .AddedLabels (not .RemovedLabels)}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.TrN (len .AddedLabels) "repo.issues.add_label" "repo.issues.add_labels" (RenderLabels $.Context .AddedLabels $.RepoLink) $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else if and (not .AddedLabels) .RemovedLabels}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.TrN (len .RemovedLabels) "repo.issues.remove_label" "repo.issues.remove_labels" (RenderLabels $.Context .RemovedLabels $.RepoLink) $createdStr}}
|
2018-05-09 21:59:04 +05:30
|
|
|
{{else}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.add_remove_labels" (RenderLabels $.Context .AddedLabels $.RepoLink) (RenderLabels $.Context .RemovedLabels $.RepoLink) $createdStr}}
|
2018-05-09 21:59:04 +05:30
|
|
|
{{end}}
|
|
|
|
</span>
|
2022-01-21 23:29:26 +05:30
|
|
|
</div>
|
2018-05-09 21:59:04 +05:30
|
|
|
{{end}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else if eq .Type 8}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-milestone"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-25 19:32:20 +05:30
|
|
|
{{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.change_milestone_at" .OldMilestone.Name .Milestone.Name $createdStr}}{{else}}{{ctx.Locale.Tr "repo.issues.remove_milestone_at" .OldMilestone.Name $createdStr}}{{end}}{{else if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.add_milestone_at" .Milestone.Name $createdStr}}{{end}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
2017-09-12 12:18:13 +05:30
|
|
|
</div>
|
2023-11-08 00:15:06 +05:30
|
|
|
{{else if and (eq .Type 9) (gt .AssigneeID 0)}}
|
2022-01-21 23:29:26 +05:30
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-person"}}</span>
|
2023-11-08 00:15:06 +05:30
|
|
|
{{if .RemovedAssignee}}
|
|
|
|
{{template "shared/user/avatarlink" dict "user" .Assignee}}
|
|
|
|
<span class="text grey muted-links">
|
|
|
|
{{template "shared/user/authorlink" .Assignee}}
|
|
|
|
{{if eq .Poster.ID .Assignee.ID}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.remove_self_assignment" $createdStr}}
|
2023-11-08 00:15:06 +05:30
|
|
|
{{else}}
|
2024-02-25 19:32:20 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.remove_assignee_at" .Poster.GetDisplayName $createdStr}}
|
2023-11-08 00:15:06 +05:30
|
|
|
{{end}}
|
|
|
|
</span>
|
|
|
|
{{else}}
|
|
|
|
{{template "shared/user/avatarlink" dict "user" .Assignee}}
|
|
|
|
<span class="text grey muted-links">
|
|
|
|
{{template "shared/user/authorlink" .Assignee}}
|
|
|
|
{{if eq .Poster.ID .AssigneeID}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.self_assign_at" $createdStr}}
|
2023-11-08 00:15:06 +05:30
|
|
|
{{else}}
|
2024-02-25 19:32:20 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.add_assignee_at" .Poster.GetDisplayName $createdStr}}
|
2023-11-08 00:15:06 +05:30
|
|
|
{{end}}
|
|
|
|
</span>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 10}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-pencil"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.change_title_at" (.OldTitle|RenderEmoji $.Context) (.NewTitle|RenderEmoji $.Context) $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 11}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-git-branch"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-25 19:32:20 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.delete_branch_at" .OldRef $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 12}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.start_tracking_history" $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 13}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.stop_tracking_history" $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
2023-04-07 20:09:08 +05:30
|
|
|
{{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}}
|
2022-01-21 23:29:26 +05:30
|
|
|
<div class="detail">
|
|
|
|
{{svg "octicon-clock"}}
|
2023-06-23 17:42:39 +05:30
|
|
|
{{if .RenderedContent}}
|
|
|
|
{{/* compatibility with time comments made before v1.21 */}}
|
|
|
|
<span class="text grey muted-links">{{.RenderedContent}}</span>
|
|
|
|
{{else}}
|
|
|
|
<span class="text grey muted-links">{{.Content|Sec2Time}}</span>
|
|
|
|
{{end}}
|
2020-01-21 15:48:52 +05:30
|
|
|
</div>
|
2022-01-21 23:29:26 +05:30
|
|
|
</div>
|
|
|
|
{{else if eq .Type 14}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.add_time_history" $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
2023-04-07 20:09:08 +05:30
|
|
|
{{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}}
|
2020-01-21 15:48:52 +05:30
|
|
|
<div class="detail">
|
2022-01-21 23:29:26 +05:30
|
|
|
{{svg "octicon-clock"}}
|
2023-06-23 17:42:39 +05:30
|
|
|
{{if .RenderedContent}}
|
|
|
|
{{/* compatibility with time comments made before v1.21 */}}
|
|
|
|
<span class="text grey muted-links">{{.RenderedContent}}</span>
|
|
|
|
{{else}}
|
|
|
|
<span class="text grey muted-links">{{.Content|Sec2Time}}</span>
|
|
|
|
{{end}}
|
2020-01-21 15:48:52 +05:30
|
|
|
</div>
|
2022-01-21 23:29:26 +05:30
|
|
|
</div>
|
|
|
|
{{else if eq .Type 15}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.cancel_tracking_history" $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 16}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.due_date_added" (DateTime "long" .Content) $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 17}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2023-04-29 17:32:29 +05:30
|
|
|
{{$parsedDeadline := StringUtils.Split .Content "|"}}
|
|
|
|
{{if eq (len $parsedDeadline) 2}}
|
|
|
|
{{$from := DateTime "long" (index $parsedDeadline 1)}}
|
|
|
|
{{$to := DateTime "long" (index $parsedDeadline 0)}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.due_date_modified" $to $from $createdStr}}
|
2023-04-29 17:32:29 +05:30
|
|
|
{{end}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 18}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.due_date_remove" (DateTime "long" .Content) $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 19}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-package-dependents"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.dependency.added_dependency" $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
{{if .DependentIssue}}
|
|
|
|
<div class="detail">
|
|
|
|
{{svg "octicon-plus"}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2023-02-06 23:39:18 +05:30
|
|
|
<a href="{{.DependentIssue.Link}}">
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if eq .DependentIssue.RepoID .Issue.RepoID}}
|
|
|
|
#{{.DependentIssue.Index}} {{.DependentIssue.Title}}
|
|
|
|
{{else}}
|
|
|
|
{{.DependentIssue.Repo.FullName}}#{{.DependentIssue.Index}} - {{.DependentIssue.Title}}
|
|
|
|
{{end}}
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</div>
|
2020-01-23 22:58:15 +05:30
|
|
|
{{end}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</div>
|
|
|
|
{{else if eq .Type 20}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-package-dependents"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.dependency.removed_dependency" $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
{{if .DependentIssue}}
|
|
|
|
<div class="detail">
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">{{svg "octicon-trash"}}</span>
|
|
|
|
<span class="text grey muted-links">
|
2023-02-06 23:39:18 +05:30
|
|
|
<a href="{{.DependentIssue.Link}}">
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if eq .DependentIssue.RepoID .Issue.RepoID}}
|
|
|
|
#{{.DependentIssue.Index}} {{.DependentIssue.Title}}
|
|
|
|
{{else}}
|
|
|
|
{{.DependentIssue.Repo.FullName}}#{{.DependentIssue.Index}} - {{.DependentIssue.Title}}
|
|
|
|
{{end}}
|
|
|
|
</a>
|
2021-09-18 21:52:51 +05:30
|
|
|
</span>
|
2022-01-21 23:29:26 +05:30
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 22}}
|
2023-10-15 02:43:59 +05:30
|
|
|
<div class="timeline-item-group" id="{{.HashTag}}">
|
2022-01-21 23:29:26 +05:30
|
|
|
<div class="timeline-item event">
|
2024-02-24 13:19:16 +05:30
|
|
|
{{if not .OriginalAuthor}}
|
2024-02-09 09:29:39 +05:30
|
|
|
{{/* Some timeline avatars need a offset to correctly align with their speech
|
2023-05-10 14:46:44 +05:30
|
|
|
bubble. The condition depends on review type and for positive reviews whether
|
|
|
|
there is a comment element or not */}}
|
2023-05-14 19:45:59 +05:30
|
|
|
<a class="timeline-avatar{{if or (and (eq .Review.Type 1) (or .Content .Attachments)) (and (eq .Review.Type 2) (or .Content .Attachments)) (eq .Review.Type 3)}} timeline-avatar-offset{{end}}"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{ctx.AvatarUtils.Avatar .Poster 40}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</a>
|
2020-04-11 03:31:41 +05:30
|
|
|
{{end}}
|
2024-03-09 02:32:05 +05:30
|
|
|
<span class="badge{{if eq .Review.Type 1}} tw-bg-green tw-text-white{{else if eq .Review.Type 3}} tw-bg-red tw-text-white{{end}}">{{svg (printf "octicon-%s" .Review.Type.Icon)}}</span>
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2024-02-26 09:38:21 +05:30
|
|
|
{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if eq .Review.Type 1}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.review.approve" $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else if eq .Review.Type 2}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.review.comment" $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else if eq .Review.Type 3}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.review.reject" $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.review.comment" $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
|
|
|
{{if .Review.Dismissed}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<div class="ui small label">{{ctx.Locale.Tr "repo.issues.review.dismissed_label"}}</div>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
|
|
|
</span>
|
|
|
|
</div>
|
2023-02-21 21:38:20 +05:30
|
|
|
{{if or .Content .Attachments}}
|
2023-10-15 02:43:59 +05:30
|
|
|
<div class="timeline-item comment">
|
2022-01-21 23:29:26 +05:30
|
|
|
<div class="content comment-container">
|
2023-02-13 23:29:59 +05:30
|
|
|
<div class="ui top attached header comment-header gt-df gt-ac gt-sb">
|
|
|
|
<div class="comment-header-left gt-df gt-ac">
|
2023-05-10 14:46:44 +05:30
|
|
|
{{if gt .Poster.ID 0}}
|
|
|
|
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
|
2023-08-10 08:49:39 +05:30
|
|
|
{{ctx.AvatarUtils.Avatar .Poster 24}}
|
2023-05-10 14:46:44 +05:30
|
|
|
</a>
|
|
|
|
{{end}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-08-31 21:28:54 +05:30
|
|
|
{{if .OriginalAuthor}}
|
2023-05-22 05:07:32 +05:30
|
|
|
<span class="text black gt-font-semibold">
|
2022-01-21 23:29:26 +05:30
|
|
|
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
|
2022-08-31 21:28:54 +05:30
|
|
|
{{.OriginalAuthor}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links"> {{if $.Repository.OriginalURL}}</span>
|
2024-02-25 19:32:20 +05:30
|
|
|
<span class="text migrate">({{ctx.Locale.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname}}){{end}}</span>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else}}
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
2020-04-11 03:31:41 +05:30
|
|
|
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.review.left_comment"}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
</div>
|
2023-02-13 23:29:59 +05:30
|
|
|
<div class="comment-header-right actions gt-df gt-ac">
|
2023-08-22 11:00:33 +05:30
|
|
|
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}}
|
|
|
|
{{if not $.Repository.IsArchived}}
|
|
|
|
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
|
|
|
|
{{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" . "delete" false "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
|
|
|
|
{{end}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</div>
|
2022-01-18 22:58:38 +05:30
|
|
|
</div>
|
2022-01-21 23:29:26 +05:30
|
|
|
<div class="ui attached segment comment-body">
|
2022-07-26 18:41:39 +05:30
|
|
|
<div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission (and $.IsSigned (eq $.SignedUserID .PosterID))}}data-can-edit="true"{{end}}>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if .RenderedContent}}
|
2024-03-01 12:41:51 +05:30
|
|
|
{{.RenderedContent}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
2022-01-18 22:58:38 +05:30
|
|
|
{{end}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</div>
|
2023-02-19 09:36:14 +05:30
|
|
|
<div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div>
|
2023-04-20 12:09:44 +05:30
|
|
|
<div class="edit-content-zone gt-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if .Attachments}}
|
2024-03-05 10:29:16 +05:30
|
|
|
{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
|
2020-04-28 23:35:39 +05:30
|
|
|
{{end}}
|
2020-04-11 03:31:41 +05:30
|
|
|
</div>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{$reactions := .Reactions.GroupByType}}
|
|
|
|
{{if $reactions}}
|
2023-05-28 07:04:18 +05:30
|
|
|
{{template "repo/issue/view_content/reactions" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
|
2021-06-15 06:42:33 +05:30
|
|
|
{{end}}
|
2020-04-11 03:31:41 +05:30
|
|
|
</div>
|
2019-07-07 03:33:00 +05:30
|
|
|
</div>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
2020-04-18 19:20:25 +05:30
|
|
|
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if .Review.CodeComments}}
|
|
|
|
<div class="timeline-item event">
|
2022-08-31 21:28:54 +05:30
|
|
|
{{range $filename, $lines := .Review.CodeComments}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{range $line, $comms := $lines}}
|
2024-01-24 08:56:28 +05:30
|
|
|
{{template "repo/issue/view_content/conversation" dict "." $ "comments" $comms}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
2020-04-11 03:31:41 +05:30
|
|
|
{{end}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</div>
|
2018-08-06 10:13:22 +05:30
|
|
|
{{end}}
|
2020-04-11 03:31:41 +05:30
|
|
|
</div>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else if eq .Type 23}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-lock"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2022-08-31 21:28:54 +05:30
|
|
|
{{if .Content}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.lock_with_reason" .Content $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
2022-08-31 21:28:54 +05:30
|
|
|
{{else}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.lock_no_reason" $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
2022-08-31 21:28:54 +05:30
|
|
|
{{end}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</div>
|
|
|
|
{{else if eq .Type 24}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-key"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.unlock_comment" $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 25}}
|
|
|
|
<div class="timeline-item event">
|
|
|
|
<span class="badge">{{svg "octicon-git-branch"}}</span>
|
2024-02-24 13:19:16 +05:30
|
|
|
{{if not .OriginalAuthor}}
|
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
|
|
|
{{end}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2024-02-26 09:38:21 +05:30
|
|
|
{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
|
2024-02-25 19:32:20 +05:30
|
|
|
{{ctx.Locale.Tr "repo.pulls.change_target_branch_at" .OldRef .NewRef $createdStr}}
|
2019-07-07 03:33:00 +05:30
|
|
|
</span>
|
2022-01-21 23:29:26 +05:30
|
|
|
</div>
|
|
|
|
{{else if eq .Type 26}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
|
|
|
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.del_time_history" $createdStr}}
|
2019-07-07 03:33:00 +05:30
|
|
|
</span>
|
2022-01-21 23:29:26 +05:30
|
|
|
<div class="detail">
|
|
|
|
{{svg "octicon-clock"}}
|
2023-06-23 17:42:39 +05:30
|
|
|
{{if .RenderedContent}}
|
|
|
|
{{/* compatibility with time comments made before v1.21 */}}
|
|
|
|
<span class="text grey muted-links">{{.RenderedContent}}</span>
|
|
|
|
{{else}}
|
|
|
|
<span class="text grey muted-links">- {{.Content|Sec2Time}}</span>
|
|
|
|
{{end}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</div>
|
2019-12-28 02:00:58 +05:30
|
|
|
</div>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else if eq .Type 27}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-eye"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if (gt .AssigneeID 0)}}
|
|
|
|
{{if .RemovedAssignee}}
|
|
|
|
{{if eq .PosterID .AssigneeID}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.review.remove_review_request_self" $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else}}
|
2024-02-25 19:32:20 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.review.remove_review_request" .Assignee.GetDisplayName $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
2020-10-13 01:25:13 +05:30
|
|
|
{{else}}
|
2024-02-25 19:32:20 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.review.add_review_request" .Assignee.GetDisplayName $createdStr}}
|
2020-10-13 01:25:13 +05:30
|
|
|
{{end}}
|
2020-04-06 22:03:34 +05:30
|
|
|
{{else}}
|
2023-04-20 05:20:00 +05:30
|
|
|
<!-- If the assigned team is deleted, just displaying "Ghost Team" in the comment -->
|
|
|
|
{{$teamName := "Ghost Team"}}
|
|
|
|
{{if .AssigneeTeam}}
|
|
|
|
{{$teamName = .AssigneeTeam.Name}}
|
|
|
|
{{end}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if .RemovedAssignee}}
|
2024-02-25 19:32:20 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.review.remove_review_request" $teamName $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else}}
|
2024-02-25 19:32:20 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.review.add_review_request" $teamName $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
2020-10-13 01:25:13 +05:30
|
|
|
{{end}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{{else if and (eq .Type 29) (or (gt .CommitsNum 0) .IsForcePush)}}
|
Fix cannot reopen after pushing commits to a closed PR (#23189)
Close: #22784
1. On GH, we can reopen a PR which was closed before after pushing
commits. After reopening PR, we can see the commits that were pushed
after closing PR in the time line. So the case of
[issue](https://github.com/go-gitea/gitea/issues/22784) is a bug which
needs to be fixed.
2. After closing a PR and pushing commits, `headBranchSha` is not equal
to `sha`(which is the last commit ID string of reference). If the
judgement exists, the button of reopen will not display. So, skip the
judgement if the status of PR is closed.
![image](https://user-images.githubusercontent.com/33891828/222037529-651fccf9-0bba-433e-b2f0-79c17e0cc812.png)
3. Even if PR is already close, we should still insert comment record
into DB when we push commits.
So we should still call function `CreatePushPullComment()`.
https://github.com/go-gitea/gitea/blob/067b0c2664d127c552ccdfd264257caca4907a77/services/pull/pull.go#L260-L282
So, I add a switch(`includeClosed`) to the
`GetUnmergedPullRequestsByHeadInfo` func to control whether the status
of PR must be open. In this case, by setting `includeClosed` to `true`,
we can query the closed PR.
![image](https://user-images.githubusercontent.com/33891828/222621045-bb80987c-10c5-4eac-aa0c-1fb9c6aefb51.png)
4. In the loop of comments, I use the`latestCloseCommentID` variable to
record the last occurrence of the close comment.
In the go template, if the status of PR is closed, the comments whose
type is `CommentTypePullRequestPush(29)` after `latestCloseCommentID`
won't be rendered.
![image](https://user-images.githubusercontent.com/33891828/222058913-c91cf3e3-819b-40c5-8015-654b31eeccff.png)
e.g.
1). The initial status of the PR is opened.
![image](https://user-images.githubusercontent.com/33891828/222453617-33c5093e-f712-4cd6-8489-9f87e2075869.png)
2). Then I click the button of `Close`. PR is closed now.
![image](https://user-images.githubusercontent.com/33891828/222453694-25c588a9-c121-4897-9ae5-0b13cf33d20b.png)
3). I try to push a commit to this PR, even though its current status is
closed.
![image](https://user-images.githubusercontent.com/33891828/222453916-361678fb-7321-410d-9e37-5a26e8095638.png)
But in comments list, this commit do not display.This is as expected :)
![image](https://user-images.githubusercontent.com/33891828/222454169-7617a791-78d2-404e-be5e-77d555f93313.png)
4). Click the `Reopen` button, the commit which is pushed after closing
PR display now.
![image](https://user-images.githubusercontent.com/33891828/222454533-897893b6-b96e-4701-b5cb-b1800f382b8f.png)
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-03-03 18:46:58 +05:30
|
|
|
<!-- If PR is closed, the comments whose type is CommentTypePullRequestPush(29) after latestCloseCommentID won't be rendered. //-->
|
|
|
|
{{if and .Issue.IsClosed (gt .ID $.LatestCloseCommentID)}}
|
|
|
|
{{continue}}
|
2023-03-04 10:18:05 +05:30
|
|
|
{{end}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
2022-01-21 23:29:26 +05:30
|
|
|
<span class="badge">{{svg "octicon-repo-push"}}</span>
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2022-08-31 21:28:54 +05:30
|
|
|
{{if .IsForcePush}}
|
2024-02-25 19:32:20 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.force_push_codes" $.Issue.PullRequest.HeadBranch (ShortSha .OldCommit) ($.Issue.Repo.CommitLink .OldCommit) (ShortSha .NewCommit) ($.Issue.Repo.CommitLink .NewCommit) $createdStr}}
|
2020-08-17 08:37:38 +05:30
|
|
|
{{else}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{ctx.Locale.TrN (len .Commits) "repo.issues.push_commit_1" "repo.issues.push_commits_n" (len .Commits) $createdStr}}
|
2020-08-17 08:37:38 +05:30
|
|
|
{{end}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
2023-03-02 00:49:47 +05:30
|
|
|
{{if and .IsForcePush $.Issue.PullRequest.BaseRepo.Name}}
|
2024-03-04 09:03:20 +05:30
|
|
|
<span class="tw-float-right comparebox">
|
2023-09-25 14:26:50 +05:30
|
|
|
<a href="{{$.Issue.PullRequest.BaseRepo.Link}}/compare/{{PathEscape .OldCommit}}..{{PathEscape .NewCommit}}" rel="nofollow" class="ui compare label">{{ctx.Locale.Tr "repo.issues.force_push_compare"}}</a>
|
2023-03-02 00:49:47 +05:30
|
|
|
</span>
|
|
|
|
{{end}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</div>
|
|
|
|
{{if not .IsForcePush}}
|
|
|
|
{{template "repo/commits_list_small" dict "comment" . "root" $}}
|
|
|
|
{{end}}
|
|
|
|
{{else if eq .Type 30}}
|
|
|
|
{{if not $.UnitProjectsGlobalDisabled}}
|
2021-02-11 23:02:25 +05:30
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
2022-01-21 23:29:26 +05:30
|
|
|
<span class="badge">{{svg "octicon-project"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2023-04-22 02:45:17 +05:30
|
|
|
{{$oldProjectDisplayHtml := "Unknown Project"}}
|
|
|
|
{{if .OldProject}}
|
|
|
|
{{$trKey := printf "projects.type-%d.display_name" .OldProject.Type}}
|
2024-02-25 16:15:56 +05:30
|
|
|
{{$oldProjectDisplayHtml = HTMLFormat `<span data-tooltip-content="%s">%s</span>` (ctx.Locale.Tr $trKey) .OldProject.Title}}
|
2023-04-22 02:45:17 +05:30
|
|
|
{{end}}
|
|
|
|
{{$newProjectDisplayHtml := "Unknown Project"}}
|
|
|
|
{{if .Project}}
|
|
|
|
{{$trKey := printf "projects.type-%d.display_name" .Project.Type}}
|
2024-02-25 16:15:56 +05:30
|
|
|
{{$newProjectDisplayHtml = HTMLFormat `<span data-tooltip-content="%s">%s</span>` (ctx.Locale.Tr $trKey) .Project.Title}}
|
2023-04-22 02:45:17 +05:30
|
|
|
{{end}}
|
|
|
|
{{if and (gt .OldProjectID 0) (gt .ProjectID 0)}}
|
2024-02-25 16:15:56 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.change_project_at" $oldProjectDisplayHtml $newProjectDisplayHtml $createdStr}}
|
2023-04-22 02:45:17 +05:30
|
|
|
{{else if gt .OldProjectID 0}}
|
2024-02-25 16:15:56 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.remove_project_at" $oldProjectDisplayHtml $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else if gt .ProjectID 0}}
|
2024-02-25 16:15:56 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.add_project_at" $newProjectDisplayHtml $createdStr}}
|
2021-02-11 23:02:25 +05:30
|
|
|
{{end}}
|
|
|
|
</span>
|
|
|
|
</div>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
|
|
|
{{else if eq .Type 32}}
|
|
|
|
<div class="timeline-item-group">
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<a class="timeline-avatar"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
|
2023-05-14 19:45:59 +05:30
|
|
|
<img src="{{.Poster.AvatarLink $.Context}}" width="40" height="40">
|
2022-01-21 23:29:26 +05:30
|
|
|
</a>
|
|
|
|
<span class="badge grey">{{svg "octicon-x" 16}}</span>
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{$reviewerName := ""}}
|
|
|
|
{{if eq .Review.OriginalAuthor ""}}
|
|
|
|
{{$reviewerName = .Review.Reviewer.Name}}
|
|
|
|
{{else}}
|
|
|
|
{{$reviewerName = .Review.OriginalAuthor}}
|
|
|
|
{{end}}
|
2024-02-22 22:32:33 +05:30
|
|
|
<span class="dismissed-message">{{ctx.Locale.Tr "repo.issues.review.dismissed" $reviewerName $createdStr}}</span>
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{{if .Content}}
|
|
|
|
<div class="timeline-item comment">
|
|
|
|
<div class="content">
|
2023-05-10 14:46:44 +05:30
|
|
|
<div class="ui top attached header comment-header-left gt-df gt-ac arrow-top">
|
|
|
|
{{if gt .Poster.ID 0}}
|
|
|
|
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
|
2023-08-10 08:49:39 +05:30
|
|
|
{{ctx.AvatarUtils.Avatar .Poster 24}}
|
2023-05-10 14:46:44 +05:30
|
|
|
</a>
|
|
|
|
{{end}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2023-09-25 14:26:50 +05:30
|
|
|
{{ctx.Locale.Tr "action.review_dismissed_reason"}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
<div class="render-content markup">
|
|
|
|
{{if .RenderedContent}}
|
2024-03-01 12:41:51 +05:30
|
|
|
{{.RenderedContent}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else}}
|
2023-09-25 14:26:50 +05:30
|
|
|
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
|
|
|
</div>
|
2021-02-11 23:02:25 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-11-19 15:24:31 +05:30
|
|
|
{{end}}
|
2022-01-21 23:29:26 +05:30
|
|
|
</div>
|
|
|
|
{{else if eq .Type 33}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-git-branch"}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2022-09-03 15:03:34 +05:30
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{if and .OldRef .NewRef}}
|
2024-02-25 19:32:20 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.change_ref_at" .OldRef .NewRef $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else if .OldRef}}
|
2024-02-25 19:32:20 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.remove_ref_at" .OldRef $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{else}}
|
2024-02-25 19:32:20 +05:30
|
|
|
{{ctx.Locale.Tr "repo.issues.add_ref_at" .NewRef $createdStr}}
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
|
|
|
</span>
|
|
|
|
</div>
|
2022-05-07 22:35:52 +05:30
|
|
|
{{else if or (eq .Type 34) (eq .Type 35)}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-git-merge" 16}}</span>
|
2023-01-20 09:30:32 +05:30
|
|
|
<span class="text grey muted-links">
|
2024-02-26 09:38:21 +05:30
|
|
|
{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{if eq .Type 34}}{{ctx.Locale.Tr "repo.pulls.auto_merge_newly_scheduled_comment" $createdStr}}
|
|
|
|
{{else}}{{ctx.Locale.Tr "repo.pulls.auto_merge_canceled_schedule_comment" $createdStr}}{{end}}
|
2022-05-07 22:35:52 +05:30
|
|
|
</span>
|
|
|
|
</div>
|
2023-05-25 18:47:19 +05:30
|
|
|
{{else if or (eq .Type 36) (eq .Type 37)}}
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
<span class="badge">{{svg "octicon-pin" 16}}</span>
|
2023-08-10 08:49:39 +05:30
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2023-05-25 18:47:19 +05:30
|
|
|
<span class="text grey muted-links">
|
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-22 22:32:33 +05:30
|
|
|
{{if eq .Type 36}}{{ctx.Locale.Tr "repo.issues.pin_comment" $createdStr}}
|
|
|
|
{{else}}{{ctx.Locale.Tr "repo.issues.unpin_comment" $createdStr}}{{end}}
|
2023-05-25 18:47:19 +05:30
|
|
|
</span>
|
|
|
|
</div>
|
2022-01-21 23:29:26 +05:30
|
|
|
{{end}}
|
2018-08-06 10:13:22 +05:30
|
|
|
{{end}}
|
2017-03-17 11:27:43 +05:30
|
|
|
{{end}}
|