* New approvals don't require content
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix edge-bug
Signed-off-by: jolheiser <john.olheiser@gmail.com>
return nil, nil, err
}
- if len(strings.TrimSpace(content)) == 0 {
+ if reviewType != ReviewTypeApprove && len(strings.TrimSpace(content)) == 0 {
return nil, nil, ContentEmptyErr{}
}
if err := review.loadCodeComments(sess); err != nil {
return nil, nil, err
}
- if len(review.CodeComments) == 0 && len(strings.TrimSpace(content)) == 0 {
+ if reviewType != ReviewTypeApprove && len(review.CodeComments) == 0 && len(strings.TrimSpace(content)) == 0 {
return nil, nil, ContentEmptyErr{}
}