Beispiel #1
0
        public TheEditMethod()
        {
            var github = Helper.GetAuthenticatedClient();

            _context = github.CreateRepositoryContext("source-repo").Result;
            _fixture = github.Repository.Branch;
        }
        public TheAddProtectedBranchUserRestrictionsMethod()
        {
            _github = Helper.GetAuthenticatedClient();
            _client = _github.Repository.Branch;

            _orgRepoContext = _github.CreateOrganizationRepositoryWithProtectedBranch().Result;
        }
        public ObservableRepositoryBranchesClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client = client.Repository.Branch;
            _connection = client.Connection;
        }
Beispiel #4
0
        public ObservableRepositoryBranchesClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client     = client.Repository.Branch;
            _connection = client.Connection;
        }
        public TheAddAdminEnforcementMethod()
        {
            var github = Helper.GetAuthenticatedClient();

            _client = github.Repository.Branch;

            _userRepoContext = github.CreateRepositoryWithProtectedBranch().Result;
        }
        public TheAddRequiredStatusChecksContextsMethod()
        {
            var github = Helper.GetAuthenticatedClient();

            _client = github.Repository.Branch;

            _userRepoContext = github.CreateRepositoryWithProtectedBranch().Result;
        }
        public TheAddProtectedBranchTeamRestrictionsMethod()
        {
            _github = Helper.GetAuthenticatedClient();
            _client = _github.Repository.Branch;

            _contextOrgTeam2 = _github.CreateTeamContext(Helper.Organization, new NewTeam(Helper.MakeNameWithTimestamp("team2"))).Result;
            _orgRepoContext  = _github.CreateOrganizationRepositoryWithProtectedBranch().Result;
        }
Beispiel #8
0
        public TheUpdateBranchProtectionMethod()
        {
            var github = Helper.GetAuthenticatedClient();

            _client = github.Repository.Branch;

            _userRepoContext = github.CreateRepositoryWithProtectedBranch().Result;
            _orgRepoContext  = github.CreateOrganizationRepositoryWithProtectedBranch().Result;
        }
        public void SetUp()
        {
            var mockLogger = Substitute.For <ILogger <GitUtils> >();

            _gitUtils = new GitUtils(mockLogger);

            _mockClient = Substitute.For <IGitHubClient>();
            _mockRepositoryBranchesClient = Substitute.For <IRepositoryBranchesClient>();
            _mockPullRequestsClient       = Substitute.For <IPullRequestsClient>();
            _mockClient.Repository.Branch.Returns(_mockRepositoryBranchesClient);
            _mockClient.Repository.PullRequest.Returns(_mockPullRequestsClient);
        }
Beispiel #10
0
 public TheDeleteBranchProtectionMethod()
 {
     _github = Helper.GetAuthenticatedClient();
     _client = _github.Repository.Branch;
 }
 public TheDeleteBranchProtectionMethod()
 {
     _github = Helper.GetAuthenticatedClient();
     _client = _github.Repository.Branch;
 }
        public TheUpdateBranchProtectionMethod()
        {
            var github = Helper.GetAuthenticatedClient();
            _client = github.Repository.Branch;

            _userRepoContext = github.CreateRepositoryWithProtectedBranch().Result;
            _orgRepoContext = github.CreateOrganizationRepositoryWithProtectedBranch().Result;
        }
 public TheEditMethod()
 {
     var github = Helper.GetAuthenticatedClient();
     _context = github.CreateRepositoryContext("source-repo").Result;
     _fixture = github.Repository.Branch;
 }
        public TheUpdateProtectedBranchTeamRestrictionsMethod()
        {
            _github = Helper.GetAuthenticatedClient();
            _client = _github.Repository.Branch;

            _contextOrgTeam2 = _github.CreateTeamContext(Helper.Organization, new NewTeam(Helper.MakeNameWithTimestamp("team2"))).Result;
            _orgRepoContext = _github.CreateOrganizationRepositoryWithProtectedBranch().Result;
        }
        public TheGetProtectedBranchTeamRestrictionsMethod()
        {
            var github = Helper.GetAuthenticatedClient();
            _client = github.Repository.Branch;

            _orgRepoContext = github.CreateOrganizationRepositoryWithProtectedBranch().Result;
        }
 public TheDeleteRequiredStatusChecksContextsMethod()
 {
     _github = Helper.GetAuthenticatedClient();
     _client = _github.Repository.Branch;
 }
        public TheAddRequiredStatusChecksContextsMethod()
        {
            var github = Helper.GetAuthenticatedClient();
            _client = github.Repository.Branch;

            _userRepoContext = github.CreateRepositoryWithProtectedBranch().Result;
        }
 public TheDeleteProtectedBranchUserRestrictions()
 {
     _github = Helper.GetAuthenticatedClient();
     _client = _github.Repository.Branch;
 }
        public TheUpdateProtectedBranchUserRestrictionsMethod()
        {
            _github = Helper.GetAuthenticatedClient();
            _client = _github.Repository.Branch;

            _orgRepoContext = _github.CreateOrganizationRepositoryWithProtectedBranch().Result;
        }
 public TheDeleteProtectedBranchUserRestrictions()
 {
     _github = Helper.GetAuthenticatedClient();
     _client = _github.Repository.Branch;
 }
 public TheDeleteRequiredStatusChecksContextsMethod()
 {
     _github = Helper.GetAuthenticatedClient();
     _client = _github.Repository.Branch;
 }
 public TheRemoveAdminEnforcementMethod()
 {
     _github = Helper.GetAuthenticatedClient();
     _client = _github.Repository.Branch;
 }