using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; namespace Octokit { /// /// A client for GitHub's Repository Commits API. /// /// /// See the Repository Commits API documentation for more information. /// public interface IRepositoryCommitsClient { /// /// Compare two references in a repository /// /// The owner of the repository /// The name of the repository /// The reference to use as the base commit /// The reference to use as the head commit /// [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "base")] Task Compare(string owner, string name, string @base, string head); /// /// Gets a single commit for a given repository /// /// The owner of the repository /// The name of the repository /// The reference for the commit (SHA) /// [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Makes a network request")] Task Get(string owner, string name, string reference); /// /// Gets all commits for a given repository /// /// The owner of the repository /// The name of the repository /// Task> GetAll(string owner, string name); /// /// Gets all commits for a given repository /// /// The owner of the repository /// The name of the repository /// Used to filter list of commits returned /// Task> GetAll(string owner, string name, CommitRequest request); /// /// Get the SHA-1 of a commit reference /// /// The owner of the repository /// The name of the repository /// The repository reference /// Task GetSha1(string owner, string name, string reference); } }