public void Delete(VcsRunbookResource resource, string commitMessage = null) { var uri = branch.Link(RunbookLinkId); var commit = new CommitResource { CommitMessage = commitMessage }; repository.Client.Delete(uri, new { id = resource.Id }, commit); }
public VcsRunbookResource Create(VcsRunbookResource resource, string commitMessage = null) { var uri = branch.Link(RunbookLinkId); var resourceWithCommit = new CommitResource <VcsRunbookResource> { CommitMessage = commitMessage, Resource = resource }; return(repository.Client.Post <CommitResource <VcsRunbookResource>, VcsRunbookResource>(uri, resourceWithCommit)); }
public VcsRunbookResource Modify(VcsRunbookResource resource, string commitMessage = null) { var uri = resource.Link("Self"); var resourceWithCommit = new CommitResource <VcsRunbookResource> { CommitMessage = commitMessage, Resource = resource }; repository.Client.Put(uri, resourceWithCommit); return(repository.Client.Get <VcsRunbookResource>(uri)); }