()
| 66 | } |
| 67 | |
| 68 | func (a *PullReqActivity) AsCodeComment() *CodeComment { |
| 69 | if !a.IsValidCodeComment() { |
| 70 | return &CodeComment{} |
| 71 | } |
| 72 | return &CodeComment{ |
| 73 | ID: a.ID, |
| 74 | Version: a.Version, |
| 75 | Updated: a.Updated, |
| 76 | CodeCommentFields: CodeCommentFields{ |
| 77 | Outdated: a.CodeComment.Outdated, |
| 78 | MergeBaseSHA: a.CodeComment.MergeBaseSHA, |
| 79 | SourceSHA: a.CodeComment.SourceSHA, |
| 80 | Path: a.CodeComment.Path, |
| 81 | LineNew: a.CodeComment.LineNew, |
| 82 | SpanNew: a.CodeComment.SpanNew, |
| 83 | LineOld: a.CodeComment.LineOld, |
| 84 | SpanOld: a.CodeComment.SpanOld, |
| 85 | }, |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | func (a *PullReqActivity) IsReplyable() bool { |
| 90 | return (a.Type == enum.PullReqActivityTypeComment || a.Type == enum.PullReqActivityTypeCodeComment) && |
no test coverage detected