示例#1
0
        public void PushChangesForRepository(CommitInfo commitInfo)
        {
            string remotePath = TestDataHelper.GetTestDataRemoteRepository(commitInfo.Org, commitInfo.Repository);
            string localPath  = TestDataHelper.GetTestDataRepositoryDirectory(commitInfo.Org, commitInfo.Repository, _developer);

            TestDataHelper.CopyDirectory(localPath, remotePath, true).Wait();
        }
示例#2
0
        public string CloneRemoteRepository(string org, string repository, string destination, string branchName = "")
        {
            string remotePath = TestDataHelper.GetTestDataRemoteRepository(org, repository);

            Directory.CreateDirectory(destination);
            TestDataHelper.CopyDirectory(remotePath, destination, true).Wait();

            return(destination);
        }
示例#3
0
        public string CloneRemoteRepository(string org, string repository)
        {
            string remotePath = TestDataHelper.GetTestDataRemoteRepository(org, repository);
            string localPath  = TestDataHelper.GetTestDataRepositoryDirectory(org, repository, _developer);

            Directory.CreateDirectory(localPath);
            TestDataHelper.CopyDirectory(remotePath, localPath, true).Wait();

            return(localPath);
        }
示例#4
0
        public void CommitAndPushChanges(string org, string repository, string branchName, string localPath, string message)
        {
            string remotePath = TestDataHelper.GetTestDataRemoteRepository(org, repository);

            if (!string.IsNullOrEmpty(branchName))
            {
                remotePath += $"_branch_{branchName}";
            }

            TestDataHelper.CopyDirectory(localPath, remotePath, true).Wait();
        }
示例#5
0
 private static async Task PrepareTestData(string org, string app, string developer)
 {
     string source = TestDataHelper.GetTestDataRepositoryDirectory(org, app, developer);
     await TestDataHelper.CopyDirectory($"{source}.pretest", source, true);
 }