MCPcopy
hub / github.com/google/git-appraise / updateResolvedStatus

Method updateResolvedStatus

review/review.go:150–168  ·  view source on GitHub ↗

updateResolvedStatus calculates the aggregate status of a single comment thread, and updates the "Resolved" field of that thread accordingly.

()

Source from the content-addressed store, hash-verified

148// updateResolvedStatus calculates the aggregate status of a single comment thread,
149// and updates the "Resolved" field of that thread accordingly.
150func (thread *CommentThread) updateResolvedStatus() {
151 resolved := updateThreadsStatus(thread.Children)
152 if resolved == nil {
153 thread.Resolved = thread.Comment.Resolved
154 return
155 }
156
157 if !*resolved {
158 thread.Resolved = resolved
159 return
160 }
161
162 if thread.Comment.Resolved == nil || !*thread.Comment.Resolved {
163 thread.Resolved = nil
164 return
165 }
166
167 thread.Resolved = resolved
168}
169
170// Verify verifies the signature on a comment.
171func (thread *CommentThread) Verify() error {

Calls 1

updateThreadsStatusFunction · 0.85