Skip to content

Commit 2d38724

Browse files
committed
made-some-changes
Signed-off-by: ansita20 <ansitasingh20@gmail.com>
1 parent b843ddc commit 2d38724

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

pkg/app/piped/eventwatcher/eventwatcher.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ func (w *watcher) execute(ctx context.Context, repo git.Repo, repoID string, eve
350350
gitUpdateEvent = false
351351
branchHandledEvents = make(map[string][]*pipedservice.ReportEventStatusesRequest_Event, len(eventCfgs))
352352
gitNoChangeEvents = make([]*pipedservice.ReportEventStatusesRequest_Event, 0)
353-
failureEvents = make([]*pipedservice.ReportEventStatusesRequest_Event, 0)
354353
)
355354
for _, e := range eventCfgs {
356355
for _, cfg := range e.Configs {
@@ -436,12 +435,6 @@ func (w *watcher) execute(ctx context.Context, repo git.Repo, repoID string, eve
436435
zap.String("event-name", latestEvent.Name),
437436
zap.String("event-id", latestEvent.Id),
438437
)
439-
handledEvent := &pipedservice.ReportEventStatusesRequest_Event{
440-
Id: latestEvent.Id,
441-
Status: model.EventStatus_EVENT_FAILURE,
442-
StatusDescription: fmt.Sprintf("Event watcher handler type %s is not supported", handler.Type),
443-
}
444-
failureEvents = append(failureEvents, handledEvent)
445438
continue
446439
}
447440
}
@@ -454,14 +447,6 @@ func (w *watcher) execute(ctx context.Context, repo git.Repo, repoID string, eve
454447
w.logger.Info(fmt.Sprintf("successfully made %d events OUTDATED", len(outDatedEvents)))
455448
}
456449

457-
if len(failureEvents) > 0 {
458-
if _, err := w.apiClient.ReportEventStatuses(ctx, &pipedservice.ReportEventStatusesRequest{Events: failureEvents}); err != nil {
459-
w.logger.Error("failed to report event failure statuses", zap.Error(err))
460-
return err
461-
}
462-
w.logger.Info(fmt.Sprintf("successfully reported %d event failures", len(failureEvents)))
463-
}
464-
465450
if !gitUpdateEvent {
466451
return nil
467452
}

0 commit comments

Comments
 (0)