diff --git a/WebOptimizationProject/GitHubRepositoryOptimizer.cs b/WebOptimizationProject/GitHubRepositoryOptimizer.cs index 44335e8..2a3343f 100644 --- a/WebOptimizationProject/GitHubRepositoryOptimizer.cs +++ b/WebOptimizationProject/GitHubRepositoryOptimizer.cs @@ -41,8 +41,25 @@ public async Task> ObtainRepositoriesForOwner(string reposit return orderedPubReposNames; } + + + public async Task GoOptimize(long repositoryId, string branchName = null) + { + var repositoryInfo = await _gitOctoKitHandler.GitHubClient.Repository.Get(repositoryId); + await GoOptimize(repositoryInfo, branchName); + } + public async Task GoOptimize(string repositoryOwner, string repositoryName, string branchName = null) { + var repositoryInfo = await _gitOctoKitHandler.GitHubClient.Repository.Get(repositoryOwner, repositoryName); + await GoOptimize(repositoryInfo, branchName); + } + + public async Task GoOptimize(Repository repository, string branchName = null) + { + var repositoryOwner = repository.Owner.Name; + var repositoryName = repository.Name; + Console.WriteLine($"{repositoryOwner}/{repositoryName} is being optimized..."); Console.WriteLine();