public static RepoRequiredStatusChecksContexts ( long repositoryId, string branchName ) : |
||
repositoryId | long | The Id of the repository |
branchName | string | The name of the branch |
Результат |
/// <summary> /// Remove the required status checks contexts for the specified branch /// </summary> /// <remarks> /// See the <a href="https://developer.github.com/v3/repos/branches/#remove-required-status-checks-contexts-of-protected-branch">API documentation</a> for more details /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="branch">The name of the branch</param> /// <param name="contexts">The contexts to remove</param> public Task <IReadOnlyList <string> > DeleteRequiredStatusChecksContexts(long repositoryId, string branch, IReadOnlyList <string> contexts) { Ensure.ArgumentNotNullOrEmptyString(branch, "branch"); Ensure.ArgumentNotNull(contexts, "contexts"); return(ApiConnection.Delete <IReadOnlyList <string> >(ApiUrls.RepoRequiredStatusChecksContexts(repositoryId, branch), contexts, AcceptHeaders.ProtectedBranchesApiPreview)); }
/// <summary> /// Get the required status checks contexts for the specified branch /// </summary> /// <remarks> /// See the <a href="https://developer.github.com/v3/repos/branches/#list-required-status-checks-contexts-of-protected-branch">API documentation</a> for more details /// </remarks> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <param name="branch">The name of the branch</param> public Task <IReadOnlyList <string> > GetRequiredStatusChecksContexts(string owner, string name, string branch) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNullOrEmptyString(branch, "branch"); return(ApiConnection.Get <IReadOnlyList <string> >(ApiUrls.RepoRequiredStatusChecksContexts(owner, name, branch), null, AcceptHeaders.ProtectedBranchesApiPreview)); }