public void SetBranchCommitSha(string branchName, string commitSha, bool force = false) { var input = $@" {{ ""sha"": {commitSha.AsJson()}, ""force"": {force.AsJson()} }}"; Patch($"/repos/{FullRepositoryName}/git/refs/heads/{branchName}", input); }
public CreateRepositoryResponse CreateRepository(string description, bool @private = false) { var name = FullRepositoryName.SplitBySlash()[1]; var input = $@" {{ ""name"": {name.AsJson()}, ""description"": {description.AsJson()}, ""private"": {@private.AsJson()} }}"; var response = Post("/user/repos", input); return(new CreateRepositoryResponse() { RespositoryFullName = response.AsJsonObject().Value("full_name") }); }