예제 #1
0
        /// <summary>
        /// Remove required status checks for the specified branch
        /// </summary>
        /// <remarks>
        /// See the <a href="https://developer.github.com/v3/repos/branches/#remove-required-status-checks-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 IObservable <bool> DeleteRequiredStatusChecks(string owner, string name, string branch)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNullOrEmptyString(branch, "branch");

            return(_client.DeleteRequiredStatusChecks(owner, name, branch).ToObservable());
        }
        public async Task DeletesRequiredStatusChecks()
        {
            using (var context = await _github.CreateRepositoryWithProtectedBranch())
            {
                var repoOwner = context.RepositoryOwner;
                var repoName  = context.RepositoryName;
                var deleted   = await _client.DeleteRequiredStatusChecks(repoOwner, repoName, "master");

                Assert.True(deleted);
            }
        }