Here and there, colleague leaves a comment on my code changes which I post in gerrit. However to see them I have to:
It would be much better to see a list of code fragments which have comments, sorted by time. That way, I wouldn't have to click all over my edit history.
How do I list all comments posted on my changes in gerrit?
You could try to use REST to retrive this kind of info.
1) To list all open changes created by you:
curl -s --request GET --netrc https://GERRIT-SERVER/a/changes/?q=owner:self+AND+status:open | sed 1d | jq --raw-output ".[] | ._number"
2) To list all comments (and their dates) on a change:
curl -s --request GET --netrc https://GERRIT-SERVER/a/changes/CHANGE-NUMBER/comments | sed 1d | jq --raw-output ".[] | .[] | {Updated: .updated, Message: .message}"
Doing 1 + 2:
for c in $(curl -s --request GET --netrc https://GERRIT-SERVER/a/changes/?q=owner:self+AND+status:open | sed 1d | jq --raw-output ".[] | ._number")
do
curl -s --request GET --netrc https://GERRIT-SERVER/a/changes/$c/comments | sed 1d | jq --raw-output ".[] | .[] | {Updated: .updated, Message: .message}"
done
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With