@@ -20,34 +20,31 @@ public NotificationOperations(ILogTracer log, IOnefuzzContext context)
2020 public async Async . Task NewFiles ( Container container , string filename , bool isLastRetryAttempt ) {
2121 var notifications = GetNotifications ( container ) ;
2222 var hasNotifications = await notifications . AnyAsync ( ) ;
23-
24- if ( ! hasNotifications ) {
25- return ;
26- }
27-
2823 var reportOrRegression = await _context . Reports . GetReportOrRegression ( container , filename , expectReports : hasNotifications ) ;
29- var done = new List < NotificationTemplate > ( ) ;
30- await foreach ( var notification in notifications ) {
31- if ( done . Contains ( notification . Config ) ) {
32- continue ;
33- }
24+ if ( hasNotifications ) {
25+ var done = new List < NotificationTemplate > ( ) ;
26+ await foreach ( var notification in notifications ) {
27+ if ( done . Contains ( notification . Config ) ) {
28+ continue ;
29+ }
3430
35- done . Add ( notification . Config ) ;
31+ done . Add ( notification . Config ) ;
3632
37- if ( notification . Config is TeamsTemplate teamsTemplate ) {
38- await _context . Teams . NotifyTeams ( teamsTemplate , container , filename , reportOrRegression ! , notification . NotificationId ) ;
39- }
33+ if ( notification . Config is TeamsTemplate teamsTemplate ) {
34+ await _context . Teams . NotifyTeams ( teamsTemplate , container , filename , reportOrRegression ! , notification . NotificationId ) ;
35+ }
4036
41- if ( reportOrRegression == null ) {
42- continue ;
43- }
37+ if ( reportOrRegression == null ) {
38+ continue ;
39+ }
4440
45- if ( notification . Config is AdoTemplate adoTemplate ) {
46- await _context . Ado . NotifyAdo ( adoTemplate , container , filename , reportOrRegression , isLastRetryAttempt , notification . NotificationId ) ;
47- }
41+ if ( notification . Config is AdoTemplate adoTemplate ) {
42+ await _context . Ado . NotifyAdo ( adoTemplate , container , filename , reportOrRegression , isLastRetryAttempt , notification . NotificationId ) ;
43+ }
4844
49- if ( notification . Config is GithubIssuesTemplate githubIssuesTemplate ) {
50- await _context . GithubIssues . GithubIssue ( githubIssuesTemplate , container , filename , reportOrRegression , notification . NotificationId ) ;
45+ if ( notification . Config is GithubIssuesTemplate githubIssuesTemplate ) {
46+ await _context . GithubIssues . GithubIssue ( githubIssuesTemplate , container , filename , reportOrRegression , notification . NotificationId ) ;
47+ }
5148 }
5249 }
5350
0 commit comments