diff --git a/csharp/Platform.Bot/Program.cs b/csharp/Platform.Bot/Program.cs index 521a6b95..20d4e371 100644 --- a/csharp/Platform.Bot/Program.cs +++ b/csharp/Platform.Bot/Program.cs @@ -95,7 +95,7 @@ private static async Task Main(string[] args) var dbContext = new FileStorage(databaseFilePath?.FullName ?? new TemporaryFile().Filename); Console.WriteLine($"Bot has been started. {Environment.NewLine}Press CTRL+C to close"); var githubStorage = new GitHubStorage(githubUserName, githubApiToken, githubApplicationName); - var issueTracker = new IssueTracker(githubStorage, new HelloWorldTrigger(githubStorage, dbContext, fileSetName), new OrganizationLastMonthActivityTrigger(githubStorage), new LastCommitActivityTrigger(githubStorage), new AdminAuthorIssueTriggerDecorator(new ProtectDefaultBranchTrigger(githubStorage), githubStorage), new AdminAuthorIssueTriggerDecorator(new ChangeOrganizationRepositoriesDefaultBranchTrigger(githubStorage, dbContext), githubStorage), new AdminAuthorIssueTriggerDecorator(new ChangeOrganizationPullRequestsBaseBranchTrigger(githubStorage, dbContext), githubStorage)); + var issueTracker = new IssueTracker(githubStorage, new HelloWorldTrigger(githubStorage, dbContext, fileSetName), new OrganizationLastMonthActivityTrigger(githubStorage), new LastCommitActivityTrigger(githubStorage), new AdminAuthorPermissionDecorator(new ProtectDefaultBranchTrigger(githubStorage), githubStorage), new AdminAuthorPermissionDecorator(new ChangeOrganizationRepositoriesDefaultBranchTrigger(githubStorage, dbContext), githubStorage), new AdminAuthorPermissionDecorator(new ChangeOrganizationPullRequestsBaseBranchTrigger(githubStorage, dbContext), githubStorage)); var pullRequenstTracker = new PullRequestTracker(githubStorage, new MergeDependabotBumpsTrigger(githubStorage)); var timestampTracker = new DateTimeTracker(githubStorage, new CreateAndSaveOrganizationRepositoriesMigrationTrigger(githubStorage, dbContext, Path.Combine(Directory.GetCurrentDirectory(), "/github-migrations"))); var cancellation = new CancellationTokenSource(); diff --git a/csharp/Platform.Bot/Triggers/Decorators/AdminAuthorTriggerDecorator.cs b/csharp/Platform.Bot/Triggers/Decorators/AdminAuthorTriggerDecorator.cs index 70b73ed3..a29b6fc0 100644 --- a/csharp/Platform.Bot/Triggers/Decorators/AdminAuthorTriggerDecorator.cs +++ b/csharp/Platform.Bot/Triggers/Decorators/AdminAuthorTriggerDecorator.cs @@ -5,11 +5,11 @@ namespace Platform.Bot.Triggers.Decorators; -public class AdminAuthorIssueTriggerDecorator : ITrigger +public class AdminAuthorPermissionDecorator : ITrigger { public readonly ITrigger Trigger; public readonly GitHubStorage GithubStorage; - public AdminAuthorIssueTriggerDecorator(ITrigger trigger, GitHubStorage githubStorage) + public AdminAuthorPermissionDecorator(ITrigger trigger, GitHubStorage githubStorage) { Trigger = trigger; GithubStorage = githubStorage;