Skip to content

Commit 7a7c0c7

Browse files
Merge branch 'master' into patch-1
2 parents bc407af + bcb7f35 commit 7a7c0c7

File tree

12 files changed

+205
-92
lines changed

12 files changed

+205
-92
lines changed

models/issue_comment.go

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ func (opts *FindCommentsOptions) toConds() builder.Cond {
979979
if opts.Type != CommentTypeUnknown {
980980
cond = cond.And(builder.Eq{"comment.type": opts.Type})
981981
}
982-
if opts.Line > 0 {
982+
if opts.Line != 0 {
983983
cond = cond.And(builder.Eq{"comment.line": opts.Line})
984984
}
985985
if len(opts.TreePath) > 0 {
@@ -1078,18 +1078,35 @@ func fetchCodeCommentsByReview(e Engine, issue *Issue, currentUser *User, review
10781078
if review == nil {
10791079
review = &Review{ID: 0}
10801080
}
1081-
//Find comments
10821081
opts := FindCommentsOptions{
10831082
Type: CommentTypeCode,
10841083
IssueID: issue.ID,
10851084
ReviewID: review.ID,
10861085
}
1086+
1087+
comments, err := findCodeComments(e, opts, issue, currentUser, review)
1088+
if err != nil {
1089+
return nil, err
1090+
}
1091+
1092+
for _, comment := range comments {
1093+
if pathToLineToComment[comment.TreePath] == nil {
1094+
pathToLineToComment[comment.TreePath] = make(map[int64][]*Comment)
1095+
}
1096+
pathToLineToComment[comment.TreePath][comment.Line] = append(pathToLineToComment[comment.TreePath][comment.Line], comment)
1097+
}
1098+
return pathToLineToComment, nil
1099+
}
1100+
1101+
func findCodeComments(e Engine, opts FindCommentsOptions, issue *Issue, currentUser *User, review *Review) ([]*Comment, error) {
1102+
var comments []*Comment
1103+
if review == nil {
1104+
review = &Review{ID: 0}
1105+
}
10871106
conds := opts.toConds()
10881107
if review.ID == 0 {
10891108
conds = conds.And(builder.Eq{"invalidated": false})
10901109
}
1091-
1092-
var comments []*Comment
10931110
if err := e.Where(conds).
10941111
Asc("comment.created_unix").
10951112
Asc("comment.id").
@@ -1117,7 +1134,19 @@ func fetchCodeCommentsByReview(e Engine, issue *Issue, currentUser *User, review
11171134
return nil, err
11181135
}
11191136

1137+
n := 0
11201138
for _, comment := range comments {
1139+
if re, ok := reviews[comment.ReviewID]; ok && re != nil {
1140+
// If the review is pending only the author can see the comments (except if the review is set)
1141+
if review.ID == 0 && re.Type == ReviewTypePending &&
1142+
(currentUser == nil || currentUser.ID != re.ReviewerID) {
1143+
continue
1144+
}
1145+
comment.Review = re
1146+
}
1147+
comments[n] = comment
1148+
n++
1149+
11211150
if err := comment.LoadResolveDoer(); err != nil {
11221151
return nil, err
11231152
}
@@ -1126,25 +1155,21 @@ func fetchCodeCommentsByReview(e Engine, issue *Issue, currentUser *User, review
11261155
return nil, err
11271156
}
11281157

1129-
if re, ok := reviews[comment.ReviewID]; ok && re != nil {
1130-
// If the review is pending only the author can see the comments (except the review is set)
1131-
if review.ID == 0 {
1132-
if re.Type == ReviewTypePending &&
1133-
(currentUser == nil || currentUser.ID != re.ReviewerID) {
1134-
continue
1135-
}
1136-
}
1137-
comment.Review = re
1138-
}
1139-
11401158
comment.RenderedContent = string(markdown.Render([]byte(comment.Content), issue.Repo.Link(),
11411159
issue.Repo.ComposeMetas()))
1142-
if pathToLineToComment[comment.TreePath] == nil {
1143-
pathToLineToComment[comment.TreePath] = make(map[int64][]*Comment)
1144-
}
1145-
pathToLineToComment[comment.TreePath][comment.Line] = append(pathToLineToComment[comment.TreePath][comment.Line], comment)
11461160
}
1147-
return pathToLineToComment, nil
1161+
return comments[:n], nil
1162+
}
1163+
1164+
// FetchCodeCommentsByLine fetches the code comments for a given treePath and line number
1165+
func FetchCodeCommentsByLine(issue *Issue, currentUser *User, treePath string, line int64) ([]*Comment, error) {
1166+
opts := FindCommentsOptions{
1167+
Type: CommentTypeCode,
1168+
IssueID: issue.ID,
1169+
TreePath: treePath,
1170+
Line: line,
1171+
}
1172+
return findCodeComments(x, opts, issue, currentUser, nil)
11481173
}
11491174

11501175
// FetchCodeComments will return a 2d-map: ["Path"]["Line"] = Comments at line

modules/auth/repo_form.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ func (f *MergePullRequestForm) Validate(ctx *macaron.Context, errs binding.Error
548548

549549
// CodeCommentForm form for adding code comments for PRs
550550
type CodeCommentForm struct {
551+
Origin string `binding:"Required;In(timeline,diff)"`
551552
Content string `binding:"Required"`
552553
Side string `binding:"Required;In(previous,proposed)"`
553554
Line int64

routers/repo/pull_review.go

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,40 @@ import (
99

1010
"code.gitea.io/gitea/models"
1111
"code.gitea.io/gitea/modules/auth"
12+
"code.gitea.io/gitea/modules/base"
1213
"code.gitea.io/gitea/modules/context"
1314
"code.gitea.io/gitea/modules/log"
1415
pull_service "code.gitea.io/gitea/services/pull"
1516
)
1617

18+
const (
19+
tplConversation base.TplName = "repo/diff/conversation"
20+
tplNewComment base.TplName = "repo/diff/new_comment"
21+
)
22+
23+
// RenderNewCodeCommentForm will render the form for creating a new review comment
24+
func RenderNewCodeCommentForm(ctx *context.Context) {
25+
issue := GetActionIssue(ctx)
26+
if !issue.IsPull {
27+
return
28+
}
29+
currentReview, err := models.GetCurrentReview(ctx.User, issue)
30+
if err != nil && !models.IsErrReviewNotExist(err) {
31+
ctx.ServerError("GetCurrentReview", err)
32+
return
33+
}
34+
ctx.Data["PageIsPullFiles"] = true
35+
ctx.Data["Issue"] = issue
36+
ctx.Data["CurrentReview"] = currentReview
37+
pullHeadCommitID, err := ctx.Repo.GitRepo.GetRefCommitID(issue.PullRequest.GetGitRefName())
38+
if err != nil {
39+
ctx.ServerError("GetRefCommitID", err)
40+
return
41+
}
42+
ctx.Data["AfterCommitID"] = pullHeadCommitID
43+
ctx.HTML(200, tplNewComment)
44+
}
45+
1746
// CreateCodeComment will create a code comment including an pending review if required
1847
func CreateCodeComment(ctx *context.Context, form auth.CodeCommentForm) {
1948
issue := GetActionIssue(ctx)
@@ -58,11 +87,17 @@ func CreateCodeComment(ctx *context.Context, form auth.CodeCommentForm) {
5887
}
5988

6089
log.Trace("Comment created: %-v #%d[%d] Comment[%d]", ctx.Repo.Repository, issue.Index, issue.ID, comment.ID)
90+
91+
if form.Origin == "diff" {
92+
renderConversation(ctx, comment)
93+
return
94+
}
6195
ctx.Redirect(comment.HTMLURL())
6296
}
6397

6498
// UpdateResolveConversation add or remove an Conversation resolved mark
6599
func UpdateResolveConversation(ctx *context.Context) {
100+
origin := ctx.Query("origin")
66101
action := ctx.Query("action")
67102
commentID := ctx.QueryInt64("comment_id")
68103

@@ -103,11 +138,38 @@ func UpdateResolveConversation(ctx *context.Context) {
103138
return
104139
}
105140

141+
if origin == "diff" {
142+
renderConversation(ctx, comment)
143+
return
144+
}
106145
ctx.JSON(200, map[string]interface{}{
107146
"ok": true,
108147
})
109148
}
110149

150+
func renderConversation(ctx *context.Context, comment *models.Comment) {
151+
comments, err := models.FetchCodeCommentsByLine(comment.Issue, ctx.User, comment.TreePath, comment.Line)
152+
if err != nil {
153+
ctx.ServerError("FetchCodeCommentsByLine", err)
154+
return
155+
}
156+
ctx.Data["PageIsPullFiles"] = true
157+
ctx.Data["comments"] = comments
158+
ctx.Data["CanMarkConversation"] = true
159+
ctx.Data["Issue"] = comment.Issue
160+
if err = comment.Issue.LoadPullRequest(); err != nil {
161+
ctx.ServerError("comment.Issue.LoadPullRequest", err)
162+
return
163+
}
164+
pullHeadCommitID, err := ctx.Repo.GitRepo.GetRefCommitID(comment.Issue.PullRequest.GetGitRefName())
165+
if err != nil {
166+
ctx.ServerError("GetRefCommitID", err)
167+
return
168+
}
169+
ctx.Data["AfterCommitID"] = pullHeadCommitID
170+
ctx.HTML(200, tplConversation)
171+
}
172+
111173
// SubmitReview creates a review out of the existing pending review or creates a new one if no pending review exist
112174
func SubmitReview(ctx *context.Context, form auth.SubmitReviewForm) {
113175
issue := GetActionIssue(ctx)

routers/routes/macaron.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,7 @@ func RegisterMacaronRoutes(m *macaron.Macaron) {
856856
m.Group("/files", func() {
857857
m.Get("", context.RepoRef(), repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.ViewPullFiles)
858858
m.Group("/reviews", func() {
859+
m.Get("/new_comment", repo.RenderNewCodeCommentForm)
859860
m.Post("/comments", bindIgnErr(auth.CodeCommentForm{}), repo.CreateCodeComment)
860861
m.Post("/submit", bindIgnErr(auth.SubmitReviewForm{}), repo.SubmitReview)
861862
}, context.RepoMustNotBeArchived())

templates/repo/diff/box.tmpl

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -144,28 +144,25 @@
144144
{{end}}
145145

146146
{{if not $.Repository.IsArchived}}
147-
<div id="pull_review_add_comment" class="hide">
148-
{{template "repo/diff/new_comment" dict "root" .}}
147+
<div class="hide" id="edit-content-form">
148+
<div class="ui comment form">
149+
<div class="ui top attached tabular menu">
150+
<a class="active write item">{{$.i18n.Tr "write"}}</a>
151+
<a class="preview item" data-url="{{$.Repository.APIURL}}/markdown" data-context="{{$.RepoLink}}">{{$.i18n.Tr "preview"}}</a>
149152
</div>
150-
<div class="hide" id="edit-content-form">
151-
<div class="ui comment form">
152-
<div class="ui top attached tabular menu">
153-
<a class="active write item">{{$.i18n.Tr "write"}}</a>
154-
<a class="preview item" data-url="{{$.Repository.APIURL}}/markdown" data-context="{{$.RepoLink}}">{{$.i18n.Tr "preview"}}</a>
155-
</div>
156-
<div class="ui bottom attached active write tab segment">
157-
<textarea class="review-textarea" tabindex="1" name="content"></textarea>
158-
</div>
159-
<div class="ui bottom attached tab preview segment markdown">
160-
{{$.i18n.Tr "loading"}}
161-
</div>
162-
<div class="text right edit buttons">
163-
<div class="ui basic blue cancel button" tabindex="3">{{.i18n.Tr "repo.issues.cancel"}}</div>
164-
<div class="ui green save button" tabindex="2">{{.i18n.Tr "repo.issues.save"}}</div>
165-
</div>
166-
</div>
153+
<div class="ui bottom attached active write tab segment">
154+
<textarea class="review-textarea" tabindex="1" name="content"></textarea>
155+
</div>
156+
<div class="ui bottom attached tab preview segment markdown">
157+
{{$.i18n.Tr "loading"}}
158+
</div>
159+
<div class="text right edit buttons">
160+
<div class="ui basic blue cancel button" tabindex="3">{{.i18n.Tr "repo.issues.cancel"}}</div>
161+
<div class="ui green save button" tabindex="2">{{.i18n.Tr "repo.issues.save"}}</div>
167162
</div>
168-
{{end}}
163+
</div>
164+
</div>
165+
{{end}}
169166

170167
{{if .IsSplitStyle}}
171168
<script>

templates/repo/diff/comment_form.tmpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
{{end}}
77
<form class="ui form {{if $.hidden}}hide comment-form comment-form-reply{{end}}" action="{{$.root.Issue.HTMLURL}}/files/reviews/comments" method="post">
88
{{$.root.CsrfTokenHtml}}
9+
<input type="hidden" name="origin" value="{{if $.root.PageIsPullFiles}}diff{{else}}timeline{{end}}">
910
<input type="hidden" name="latest_commit_id" value="{{$.root.AfterCommitID}}"/>
1011
<input type="hidden" name="side" value="{{if $.Side}}{{$.Side}}{{end}}">
1112
<input type="hidden" name="line" value="{{if $.Line}}{{$.Line}}{{end}}">
@@ -29,7 +30,7 @@
2930
<span class="markdown-info">{{svg "octicon-markdown"}} {{$.root.i18n.Tr "repo.diff.comment.markdown_info"}}</span>
3031
<div class="ui right">
3132
{{if $.reply}}
32-
<button class="ui submit green tiny button btn-reply" onclick="window.submitReply(this);">{{$.root.i18n.Tr "repo.diff.comment.reply"}}</button>
33+
<button class="ui submit green tiny button btn-reply" type="submit">{{$.root.i18n.Tr "repo.diff.comment.reply"}}</button>
3334
<input type="hidden" name="reply" value="{{$.reply}}">
3435
{{else}}
3536
{{if $.root.CurrentReview}}

templates/repo/diff/conversation.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{$resolved := (index .comments 0).IsResolved}}
22
{{$resolveDoer := (index .comments 0).ResolveDoer}}
33
{{$isNotPending := (not (eq (index .comments 0).Review.Type 0))}}
4-
<div class="conversation-holder">
4+
<div class="conversation-holder" data-path="{{(index .comments 0).TreePath}}" data-side="{{if lt (index .comments 0).Line 0}}left{{else}}right{{end}}" data-idx="{{(index .comments 0).UnsignedLine}}">
55
{{if $resolved}}
66
<div class="ui attached header resolved-placeholder">
77
<span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}</span>
@@ -23,7 +23,7 @@
2323
</div>
2424
{{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" (index .comments 0).ReviewID "root" $ "comment" (index .comments 0)}}
2525
{{if and $.CanMarkConversation $isNotPending}}
26-
<button class="ui icon tiny button resolve-conversation" data-action="{{if not $resolved}}Resolve{{else}}UnResolve{{end}}" data-comment-id="{{(index .comments 0).ID}}" data-update-url="{{$.RepoLink}}/issues/resolve_conversation" >
26+
<button class="ui icon tiny button resolve-conversation" data-origin="diff" data-action="{{if not $resolved}}Resolve{{else}}UnResolve{{end}}" data-comment-id="{{(index .comments 0).ID}}" data-update-url="{{$.RepoLink}}/issues/resolve_conversation" >
2727
{{if $resolved}}
2828
{{$.i18n.Tr "repo.issues.review.un_resolve_conversation"}}
2929
{{else}}

templates/repo/diff/new_comment.tmpl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
<div class="field comment-code-cloud">
2-
{{template "repo/diff/comment_form_datahandler" .}}
1+
<div class="conversation-holder">
2+
<div class="field comment-code-cloud">
3+
{{template "repo/diff/comment_form_datahandler" .}}
4+
</div>
35
</div>

templates/repo/diff/section_split.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{$file := .file}}
22
{{range $j, $section := $file.Sections}}
33
{{range $k, $line := $section.Lines}}
4-
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}">
4+
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}" data-line-type="{{DiffLineTypeToStr .GetType}}">
55
{{if eq .GetType 4}}
66
<td class="lines-num lines-num-old">
77
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }}
@@ -24,14 +24,14 @@
2424
{{else}}
2525
<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}"></span></td>
2626
<td class="lines-type-marker lines-type-marker-old">{{if $line.LeftIdx}}<span class="mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span>{{end}}</td>
27-
<td class="lines-code lines-code-old halfwidth">{{if and $.root.SignedUserID $line.CanComment $.root.PageIsPullFiles (not (eq .GetType 2))}}<a class="ui primary button add-code-comment add-code-comment-left" data-path="{{$file.Name}}" data-side="left" data-idx="{{$line.LeftIdx}}">{{svg "octicon-plus"}}</a>{{end}}<code class="code-inner">{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></td>
27+
<td class="lines-code lines-code-old halfwidth">{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 2))}}<a class="ui primary button add-code-comment add-code-comment-left{{if (not $line.CanComment)}} invisible{{end}}" data-path="{{$file.Name}}" data-side="left" data-idx="{{$line.LeftIdx}}" data-new-comment-url="{{$.root.Issue.HTMLURL}}/files/reviews/new_comment">{{svg "octicon-plus"}}</a>{{end}}<code class="code-inner">{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></td>
2828
<td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}"></span></td>
2929
<td class="lines-type-marker lines-type-marker-new">{{if $line.RightIdx}}<span class="mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span>{{end}}</td>
30-
<td class="lines-code lines-code-new halfwidth">{{if and $.root.SignedUserID $line.CanComment $.root.PageIsPullFiles (not (eq .GetType 3))}}<a class="ui primary button add-code-comment add-code-comment-right" data-path="{{$file.Name}}" data-side="right" data-idx="{{$line.RightIdx}}">{{svg "octicon-plus"}}</a>{{end}}<code class="code-inner">{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></td>
30+
<td class="lines-code lines-code-new halfwidth">{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 3))}}<a class="ui primary button add-code-comment add-code-comment-right{{if (not $line.CanComment)}} invisible{{end}}" data-path="{{$file.Name}}" data-side="right" data-idx="{{$line.RightIdx}}" data-new-comment-url="{{$.root.Issue.HTMLURL}}/files/reviews/new_comment">{{svg "octicon-plus"}}</a>{{end}}<code class="code-inner">{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></td>
3131
{{end}}
3232
</tr>
3333
{{if gt (len $line.Comments) 0}}
34-
<tr class="add-code-comment">
34+
<tr class="add-comment" data-line-type="{{DiffLineTypeToStr .GetType}}">
3535
<td class="lines-num"></td>
3636
<td class="lines-type-marker"></td>
3737
<td class="add-comment-left">

templates/repo/diff/section_unified.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{range $j, $section := $file.Sections}}
33
{{range $k, $line := $section.Lines}}
44
{{if or $.root.AfterCommitID (ne .GetType 4)}}
5-
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}">
5+
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}" data-line-type="{{DiffLineTypeToStr .GetType}}">
66
{{if eq .GetType 4}}
77
<td colspan="2" class="lines-num">
88
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }}
@@ -29,11 +29,11 @@
2929
{{if eq .GetType 4}}
3030
<td class="chroma lines-code blob-hunk"><code class="code-inner">{{$section.GetComputedInlineDiffFor $line}}</code></td>
3131
{{else}}
32-
<td class="chroma lines-code{{if (not $line.RightIdx)}} lines-code-old{{end}}">{{if and $.root.SignedUserID $line.CanComment $.root.PageIsPullFiles}}<a class="ui primary button add-code-comment add-code-comment-{{if $line.RightIdx}}right{{else}}left{{end}}" data-path="{{$file.Name}}" data-side="{{if $line.RightIdx}}right{{else}}left{{end}}" data-idx="{{if $line.RightIdx}}{{$line.RightIdx}}{{else}}{{$line.LeftIdx}}{{end}}">{{svg "octicon-plus"}}</a>{{end}}<code class="code-inner">{{$section.GetComputedInlineDiffFor $line}}</code></td>
32+
<td class="chroma lines-code{{if (not $line.RightIdx)}} lines-code-old{{end}}">{{if and $.root.SignedUserID $.root.PageIsPullFiles}}<a class="ui primary button add-code-comment add-code-comment-{{if $line.RightIdx}}right{{else}}left{{end}}{{if (not $line.CanComment)}} invisible{{end}}" data-path="{{$file.Name}}" data-side="{{if $line.RightIdx}}right{{else}}left{{end}}" data-idx="{{if $line.RightIdx}}{{$line.RightIdx}}{{else}}{{$line.LeftIdx}}{{end}}" data-new-comment-url="{{$.root.Issue.HTMLURL}}/files/reviews/new_comment">{{svg "octicon-plus"}}</a>{{end}}<code class="code-inner">{{$section.GetComputedInlineDiffFor $line}}</code></td>
3333
{{end}}
3434
</tr>
3535
{{if gt (len $line.Comments) 0}}
36-
<tr>
36+
<tr class="add-comment" data-line-type="{{DiffLineTypeToStr .GetType}}">
3737
<td colspan="2" class="lines-num"></td>
3838
<td class="add-comment-left add-comment-right" colspan="2">
3939
{{template "repo/diff/conversation" mergeinto $.root "comments" $line.Comments}}

templates/repo/issue/view_content/comments.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@
530530
{{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" (index $comms 0).ReviewID "root" $ "comment" (index $comms 0)}}
531531

532532
{{if and $.CanMarkConversation $isNotPending}}
533-
<button class="ui tiny button resolve-conversation" data-action="{{if not $resolved}}Resolve{{else}}UnResolve{{end}}" data-comment-id="{{(index $comms 0).ID}}" data-update-url="{{$.RepoLink}}/issues/resolve_conversation" >
533+
<button class="ui tiny button resolve-conversation" data-origin="timeline" data-action="{{if not $resolved}}Resolve{{else}}UnResolve{{end}}" data-comment-id="{{(index $comms 0).ID}}" data-update-url="{{$.RepoLink}}/issues/resolve_conversation" >
534534
{{if $resolved}}
535535
{{$.i18n.Tr "repo.issues.review.un_resolve_conversation"}}
536536
{{else}}

0 commit comments

Comments
 (0)