I'd like to automate creation of the branches on the need. When the branch is created a few files should also be updated. I'd like to do this using Gerrit API to post a new change with files changed in it <snip>
I'd like to automate creation of the branches on the need. When the branch is created a few files should also be updated. I'd like to do this using Gerrit API to post a new change with files changed in it.I noticed there is a https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#get-content for getting the old content of file. Then I can have a script that upgrades the content as needed. There is also https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#put-edit-file in the API with which I managed to create a new empty file into change. However, I could not figure out whether it's possible to use this or some other API end-point to actually update the content of a file to new modified one. If it is could someone help me with how should I format my call to make it work? Thanks in advance.