Parsing FileInlineDiffResponseDTO

Hey all, 

Any advise on how to parse a FileInlineDiffResponseDTO gotten from the /~rpc/getFileInReviewSummaryInlineChanges ?

it's not entirely clear to me how some of the metrics are done: some are done by newlines, some by character index, others by character index, but from the start of a specific range?


Hello Vanhuysse,

What are you trying to implement with this API method? It's some kind of internal/system and most of the data returned there would not make much sense for you.


I've been tasked with developing a jira plugin that replicates some of the upsource functionalities through the rpc and webhooks. Currently, I have to display the diff of a specific file. There were some other rpc methods that returned diff information, but this seemed to be the best option.


Alright, So I've been able to parse the added and removed lines and all code recognition formatting; only the modified lines/added & removed ranges are still a mystery to me. I've confirmed that the ranges match the changes on the modified lines, but the offset numbers do not match the the character index on the text string (unlike the syntax markup ranges, which do match).

Any advise specifically on that?


Please sign in to leave a comment.