Closed byterazor closed 2 years ago
The code review data is stored in git-notes, using the formats described below. Each item stored is written as a single line of JSON, and is written with at most one such item per line. This allows the git notes to be automatically merged using the "cat_sort_uniq" strategy.
See https://git-scm.com/docs/git-notes#Documentation/git-notes.txt---strategyltstrategygt
Thanks
The answer from @jonjohnsonjr is exactly right.
I'll add that you can run git appraise show --json ${REVIEW_HASH}
to have git-appraise combine the multiple JSON entries for you and to print the full code review as a JSON object.
Additionally, if you don't want to shell out to git-appriase
and your code is written in Go, then you could also call the git-appraise codebase as a library by doing something like this:
import "github.com/google/git-appraise/review"
...
r, err = review.Get(repo, id)
...
json, err := r.GetJSON()
...
Hello,
I am trying to parse the review requests with another tool and found out that the raw content of the review request blob is not in json format but it is just the concatenation of json objects.
Is that indented behavior? Why not generate an array of json object?
Thank you for clarification.
best regards Dominik