mirror of
https://github.com/harness/drone.git
synced 2025-05-31 11:43:15 +00:00
feat: [CODE-1788]: code comment block must start and end on the same side (#2053)
This commit is contained in:
parent
f66bfa153f
commit
0d1e536531
@ -78,6 +78,10 @@ func (in *CommentCreateInput) Validate() error {
|
|||||||
return usererror.BadRequest("code comments require line numbers")
|
return usererror.BadRequest("code comments require line numbers")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if in.LineStartNew && !in.LineEndNew || !in.LineStartNew && in.LineEndNew {
|
||||||
|
return usererror.BadRequest("code block must start and end on the same side")
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user