async void CopyCloneToS3(WebhookEvent webhookEvent) { using (GitProxy gitProxy = new GitProxy(webhookEvent, "gitlab_pwd", $"gitlab-gitlab-codebuild-integration", webhookEvent.CommitId)) { HttpStatusCode statusCode = await gitProxy.UploadSourceAsync(); } }
public ProjectAnalyzer(ProgramConfiguration configuration, MongoProxy mongoProxy, GitProxy gitProxy, GoogleProxy googleProxy, AliasReader aliasReader, ILogger <ProjectAnalyzer> logger) { _configuration = configuration; _mongoProxy = mongoProxy; _gitProxy = gitProxy; _googleProxy = googleProxy; _aliasReader = aliasReader; _logger = logger; }
public void SetRemoteOrigin_WhenCalled_SendsTcpMessage() { bool methodCalled = false; TestableCollabProxyClient theClient = new TestableCollabProxyClient(); TestHelper.RegisterListener("setremoteorigin", val => { methodCalled = true; }); IGitProxy theProxy = new GitProxy(theClient); // Make sure nothing happened up to this point Assert.IsFalse(methodCalled); theProxy.SetRemoteOrigin(""); Assert.IsTrue(methodCalled); }
public void InitializeRepository_WhenCalled_SendsTcpMessage() { bool methodCalled = false; TestableCollabProxyClient theClient = new TestableCollabProxyClient(); TestHelper.RegisterListener("initializerepository", val => { methodCalled = true; }); IGitProxy theProxy = new GitProxy(theClient); // Make sure nothing happened up to this point Assert.IsFalse(methodCalled); theProxy.InitializeRepository(); Assert.IsTrue(methodCalled); }
public void GetWorkingDirectoryChangesAsync_WhenCalled_SendsTcpMessage() { var methodCalled = false; var resetHandle = new ManualResetEvent(false); TestHelper.RegisterListener("GetWorkingDirectoryChangesAsync".ToLower(), val => { methodCalled = true; resetHandle.Set(); }); var theClient = new TestableCollabProxyClient(); theClient.StartOrConnectToServer(); IGitProxy theProxy = new GitProxy(theClient); // Make sure nothing happened up to this point Assert.IsFalse(methodCalled); theProxy.GetWorkingDirectoryChangesAsync(); resetHandle.WaitOne(); Assert.IsTrue(methodCalled); }
/// <summary> /// Create a new instance of CollabVersionControl, consisting of a CollabProxyClient and GitProxy /// </summary> public CollabVersionControl() { m_CollabProxyClient = new CollabProxyClient(); Git = new GitProxy(m_CollabProxyClient); RegisterServerCallbacks(); }