CommitStatuses() public static method

Returns the Uri that lists the commit statuses for the specified reference.
public static CommitStatuses ( long repositoryId, string reference ) : Uri
repositoryId long The Id of the repository
reference string The reference (SHA, branch name, or tag name) to list commits for
return System.Uri
        /// <summary>
        /// Retrieves commit statuses for the specified reference. A reference can be a commit SHA, a branch name, or
        /// a tag name.
        /// </summary>
        /// <remarks>
        /// https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref
        /// </remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
        /// <param name="options">Options for changing the API response</param>
        public Task <IReadOnlyList <CommitStatus> > GetAll(long repositoryId, string reference, ApiOptions options)
        {
            Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
            Ensure.ArgumentNotNull(options, "options");

            return(ApiConnection.GetAll <CommitStatus>(ApiUrls.CommitStatuses(repositoryId, reference), options));
        }
Example #2
0
        /// <summary>
        /// Retrieves commit statuses for the specified reference. A reference can be a commit SHA, a branch name, or
        /// a tag name.
        /// </summary>
        /// <remarks>
        /// https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref
        /// </remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
        /// <returns></returns>
        public Task <IReadOnlyList <CommitStatus> > GetAll(string owner, string name, string reference)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNullOrEmptyString(reference, "reference");

            return(ApiConnection.GetAll <CommitStatus>(ApiUrls.CommitStatuses(owner, name, reference)));
        }
        public Task <IReadOnlyList <CommitStatus> > GetAll(string owner, string name, string reference, ApiOptions options)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
            Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference));
            Ensure.ArgumentNotNull(options, nameof(options));

            return(ApiConnection.GetAll <CommitStatus>(ApiUrls.CommitStatuses(owner, name, reference), options));
        }