gerrit-rest-java-client
gerrit-rest-java-client copied to clipboard
CommitApi file endpoint
Hey, it's currently possible to query the contents of a file in a commit (rather than all the files in that commit) via the Gerrit rest api, however there isn't a method for this exposed in the CommitApi java class. I was wondering if I wanted to add this to your project, would I first need to add a method for it to the main Gerrit repo, or would it be okay to just add here?
Hi, thank you for pointing this out.
The files in the src/main/java/com/google directory are periodically synched with the ones of the main Gerrit repo.
For this reason, you should first add this functionality in the main Gerrit repo. Then, we will import the modified CommitApi class here and it will be possible to proceed with the implementation.
@uwolfer, do you agree?
@uwolfer, do you agree?
Yes, makes sense to me.
@nickb-carallon: I'd suggest to open an issue against Gerrit, and get feedback whether it makes sense to add to their extensions API. And in that case implement it there first.
Okay, thanks for the advice 🙂
After some more reading and pondering, I believe I can accomplish more using the Gitiles plugin for Gerrit (such as retrieving trees as well as files). However it seems that including support for plugin apis here is still under discussion so I may leave making any changes until that discussion has been resolved.
I assume you are talking about #59.
Yep, that's the one.