The API is expecting you to pass in the "row number" which is you is the number indicating which row of a side by side diff the comment is on. This row number might not match the file line number if your diff contains adds / deletes on either side.
The Review Bot project has some MIT licensed code which is used to translate from a file line number to a Review Board diff row number: https://github.com/reviewboard/ReviewBot/blob/f5a77c039dd59a5880d334c08567af3a068bf933/bot/reviewbot/processing/review.py#L87-L102 On Wed, Aug 12, 2015 at 12:25 PM, <jaylee108...@gmail.com> wrote: > Hi All, > > I have some automated machinery that creates diff comments based on the > line numbers in the new diff. > > This creates an issue on the correct line number the majority of the time. > However, there are cases when the line number passed through the API does > not strictly map to the correct diff line number in the UI. > > The belief is that the line number expected through the API is not a 1:1 > mapping with the line number on the new diff. > > What is the recommended approach to translating the new diff line number > to this API expected line number so that the issue shows up on the correct > line of the diff? > > For reference, we are using: > > > https://www.reviewboard.org/docs/manual/2.5/webapi/2.0/resources/review-diff-comment/ > > on a 2.0.12 instance. > > Thanks! > > -- > Supercharge your Review Board with Power Pack: > https://www.reviewboard.org/powerpack/ > Want us to host Review Board for you? Check out RBCommons: > https://rbcommons.com/ > Happy user? Let us know! https://www.reviewboard.org/users/ > --- > You received this message because you are subscribed to the Google Groups > "reviewboard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to reviewboard+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups "reviewboard" group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.