There is a Pushes client in Azure DevOps REST API that allows to create pushes with new commits. I followed examples provided in here however there isn't one where a file encoding is to be changed. I tried to provide the necessary encoding in a request payload as follows:
"refUpdates": [{ "name": "refs/heads/master", "oldObjectId": "..." }],
"commits": [{
"comment": "Comment",
"changes": [{
"changeType": 2, // also tried type "4" which stands for "Encoding"
"item": {
"path": "...",
"contentMetadata": { "encoding": 1252 } // UTF-8
},
"newContent": { content: "New content", contentType: 0 },
}]
}]
but it doesn't do anything, "contentMetadata" field seems to be ignored by the Pushes client.
Is there a way to change a file encoding using Azure DevOps REST API?