I'm building a flow that every time a new file is added to a Sharepoint it uploads it to an AzDO repository, I can manage it to run correctly one time, if I run the flow for a second time I get this error:
TF401028: The reference 'refs/heads/master' has already been updated by another client, so you cannot update it.
This is request I'm using:
If you have any corrections or insight I would like to read it.
Are you trying to add/commit the same file3.zip for the second time?
In the request the oldObjectId ref is 0000000000000000000000000000000000000000. After that request it would have a different id because it already exists (the newObjectId should be returned in the outputs). That is probably the reason why the second run is failing, because the oldObjectId is not 0000000000000000000000000000000000000000 anymore.
Alternatively, you might workaround this by generating a unique file name for the zip (you can use a utcNow function for that) every time you add the same file. Below is a sample expression:
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.