public static CreateCommitStatus ( long repositoryId, string reference ) : |
||
repositoryId | long | The Id of the repository |
reference | string | The reference (SHA, branch name, or tag name) to list commits for |
return |
/// <summary> /// Creates a commit status for the specified ref. /// </summary> /// <remarks> /// https://developer.github.com/v3/repos/statuses/#create-a-status /// </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="newCommitStatus">The commit status to create</param> public Task <CommitStatus> Create(long repositoryId, string reference, NewCommitStatus newCommitStatus) { Ensure.ArgumentNotNullOrEmptyString(reference, "reference"); Ensure.ArgumentNotNull(newCommitStatus, "newCommitStatus"); return(ApiConnection.Post <CommitStatus>(ApiUrls.CreateCommitStatus(repositoryId, reference), newCommitStatus)); }
/// <summary> /// Creates a commit status for the specified ref. /// </summary> /// <remarks> /// https://developer.github.com/v3/repos/statuses/#create-a-status /// </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> /// <param name="newCommitStatus">The commit status to create</param> public Task <CommitStatus> Create(string owner, string name, string reference, NewCommitStatus newCommitStatus) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNullOrEmptyString(reference, "reference"); Ensure.ArgumentNotNull(newCommitStatus, "newCommitStatus"); return(ApiConnection.Post <CommitStatus>(ApiUrls.CreateCommitStatus(owner, name, reference), newCommitStatus)); }