/// <summary> /// Deletes the specified Issue Comment /// </summary> /// <remarks>http://developer.github.com/v3/issues/comments/#delete-a-comment</remarks> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <param name="id">The comment id</param> public IObservable <Unit> Delete(string owner, string name, int id) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); return(_client.Delete(owner, name, id).ToObservable()); }
public async Task DeleteIssueComment() { var issue = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, new NewIssue("Super Issue 1")); var comment = await _issueCommentsClient.Create(_context.RepositoryOwner, _context.RepositoryName, issue.Number, "test comment 1"); await _issueCommentsClient.Delete(_context.RepositoryOwner, _context.RepositoryName, comment.Id); await Assert.ThrowsAsync <NotFoundException>(() => _issueCommentsClient.Get(_context.RepositoryOwner, _context.RepositoryName, comment.Id)); }
/// <summary> /// Deletes the specified Issue Comment /// </summary> /// <remarks>http://developer.github.com/v3/issues/comments/#delete-a-comment</remarks> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <param name="number">The comment number</param> /// <returns></returns> public IObservable <Unit> Delete(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); return(_client.Delete(owner, name, number).ToObservable()); }