in Webapp/SDAF/Controllers/Helper.cs [186:211]
public static StringContent CreateHttpContent(string changeType, string path, string content, GitRequestBody requestBody)
{
Commit commit = new()
{
comment = $"{changeType}ed {path}",
changes = new Change[]
{
new Change()
{
changeType = changeType,
item = new Item()
{
path = path,
},
newContent = new Newcontent()
{
content = content,
contentType = "rawtext"
}
}
}
};
requestBody.commits = new Commit[] { commit };
string requestJson = JsonSerializer.Serialize(requestBody);
return new StringContent(requestJson, Encoding.ASCII, "application/json");
}