Pull request commit list now implemented / tested

Renamed and enhanced existing Merged tests.
This commit is contained in:
Josh Sullivan
2013-11-12 22:31:23 -05:00
committed by Brendan Forster
parent c59c8c1389
commit 0db0307aa9
6 changed files with 96 additions and 5 deletions
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Reactive;
using System.Reactive.Threading.Tasks;
using System.Threading.Tasks;
@@ -137,5 +138,21 @@ namespace Octokit.Reactive.Clients
return _client.Merged(owner, name, number).ToObservable();
}
/// <summary>
/// Gets the list of commits on a pull request.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/#list-commits-on-a-pull-request</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="number">The pull request number</param>
/// <returns></returns>
public IObservable<Commit> Commits(string owner, string name, int number)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
return _connection.GetAndFlattenAllPages<Commit>(ApiUrls.PullRequestCommits(owner, name, number));
}
}
}