/// <summary> /// Creates a commit that updates the contents of a file in a repository. /// </summary> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <param name="path">The path to the file</param> /// <param name="request">Information about the file to update</param> /// <returns>The updated content</returns> public Task<RepositoryContentChangeSet> UpdateFile(string owner, string name, string path, UpdateFileRequest request) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNullOrEmptyString(path, "path"); Ensure.ArgumentNotNull(request, "request"); var updateUrl = ApiUrls.RepositoryContent(owner, name, path); return ApiConnection.Put<RepositoryContentChangeSet>(updateUrl, request); }
public Task <RepositoryContentChangeSet> UpdateFile(long repositoryId, string path, UpdateFileRequest request) { Ensure.ArgumentNotNullOrEmptyString(path, nameof(path)); Ensure.ArgumentNotNull(request, nameof(request)); var updateUrl = ApiUrls.RepositoryContent(repositoryId, path); return(ApiConnection.Put <RepositoryContentChangeSet>(updateUrl, request)); }
/// <summary> /// Creates a commit that updates the contents of a file in a repository. /// </summary> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <param name="path">The path to the file</param> /// <param name="request">Information about the file to update</param> /// <returns>The updated content</returns> public Task <RepositoryContentChangeSet> UpdateFile(string owner, string name, string path, UpdateFileRequest request) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNullOrEmptyString(path, "path"); Ensure.ArgumentNotNull(request, "request"); var updateUrl = ApiUrls.RepositoryContent(owner, name, path); return(ApiConnection.Put <RepositoryContentChangeSet>(updateUrl, request)); }
/// <summary> /// Creates a commit that updates the contents of a file in a repository. /// </summary> /// <param name="repositoryId">The Id of the repository</param> /// <param name="path">The path to the file</param> /// <param name="request">Information about the file to update</param> public Task<RepositoryContentChangeSet> UpdateFile(int repositoryId, string path, UpdateFileRequest request) { Ensure.ArgumentNotNullOrEmptyString(path, "path"); Ensure.ArgumentNotNull(request, "request"); var updateUrl = ApiUrls.RepositoryContent(repositoryId, path); return ApiConnection.Put<RepositoryContentChangeSet>(updateUrl, request); }