@@ -15,7 +15,7 @@ namespace aggregator.Engine
1515{
1616 internal interface IRuleEngine
1717 {
18- Task < string > RunAsync ( IRule rule , Guid projectId , WorkItemData workItemPayload , IClientsContext clients , CancellationToken cancellationToken = default ) ;
18+ Task < string > RunAsync ( IRule rule , Guid projectId , WorkItemData workItemPayload , string eventType , IClientsContext clients , CancellationToken cancellationToken = default ) ;
1919 }
2020
2121 public abstract class RuleEngineBase : IRuleEngine
@@ -34,9 +34,9 @@ protected RuleEngineBase(IAggregatorLogger logger, SaveMode saveMode, bool dryRu
3434 this . dryRun = dryRun ;
3535 }
3636
37- public async Task < string > RunAsync ( IRule rule , Guid projectId , WorkItemData workItemPayload , IClientsContext clients , CancellationToken cancellationToken = default )
37+ public async Task < string > RunAsync ( IRule rule , Guid projectId , WorkItemData workItemPayload , string eventType , IClientsContext clients , CancellationToken cancellationToken = default )
3838 {
39- var executionContext = CreateRuleExecutionContext ( projectId , workItemPayload , clients , rule . Settings ) ;
39+ var executionContext = CreateRuleExecutionContext ( projectId , workItemPayload , eventType , clients , rule . Settings ) ;
4040
4141 var result = await ExecuteRuleAsync ( rule , executionContext , cancellationToken ) ;
4242
@@ -45,7 +45,7 @@ public async Task<string> RunAsync(IRule rule, Guid projectId, WorkItemData work
4545
4646 protected abstract Task < string > ExecuteRuleAsync ( IRule rule , RuleExecutionContext executionContext , CancellationToken cancellationToken = default ) ;
4747
48- protected RuleExecutionContext CreateRuleExecutionContext ( Guid projectId , WorkItemData workItemPayload , IClientsContext clients , IRuleSettings ruleSettings )
48+ protected RuleExecutionContext CreateRuleExecutionContext ( Guid projectId , WorkItemData workItemPayload , string eventType , IClientsContext clients , IRuleSettings ruleSettings )
4949 {
5050 var workItem = workItemPayload . WorkItem ;
5151 var context = new EngineContext ( clients , projectId , workItem . GetTeamProject ( ) , logger , ruleSettings ) ;
@@ -59,7 +59,8 @@ protected RuleExecutionContext CreateRuleExecutionContext(Guid projectId, WorkIt
5959 self = self ,
6060 selfChanges = selfChanges ,
6161 store = store ,
62- logger = logger
62+ logger = logger ,
63+ eventType = eventType
6364 } ;
6465 return globals ;
6566 }
0 commit comments