Re: Review Board Ticket #4194: Include real line numbers for diff comments in API, webhook payloads

1 view
Skip to first unread message

Jon Davis

unread,
Sep 4, 2020, 4:42:06 PM9/4/20
to Jon Davis, Paul Wolf, reviewboa...@googlegroups.com
To reply, visit https://hellosplat.com/s/beanbag/tickets/4194/

New update by pianoboy1

For Beanbag, Inc. Review Board Ticket #4194

Hello -

Has there been any update on this? Can you tell me if newer versions of ReviewBoard return the real line numbers in the webhook payload and API? We have version 2.5.7 of ReviewBoard and I see there is a 3.0.18 version available.

Christian Hammond

unread,
Sep 4, 2020, 6:35:54 PM9/4/20
to Christian Hammond, Paul Wolf, reviewboa...@googlegroups.com

New update by chipx86

I'm sorry, not really. There are some reasons it's not provided that are more technical implementation details than anything. It is something we really should be doing, and I'm going to try to get this on the roadmap, but it won't help you for now.

There is a workaround, though. You can access the file diff data API by making a GET request to this with an Accept: application/vnd.reviewboard.org.diff.data+json header and the parameters for the file being commented on.

This will give you underlying data used to build the diff viewer. This contains the real line numbers and those row numbers. From there, you can access the appropriate row and get the original/modified line numbers for the row number.

This is available in Review Board 2.5 as well, but it's worth mentioning that 2.5 is no longer seeing any new development. 3.0 will soon be going into maintenance mode as well, as 4.0 is coming out before long.

Would you be able to talk about what your webhook does? We're planning work on a new major version of the API and reworking some internals, so I want to gather use cases and see what makes sense.

Reply all
Reply to author
Forward
0 new messages