Skip to content

Commit

Permalink
chore(webhook): abstract event processing into generic function
Browse files Browse the repository at this point in the history
  • Loading branch information
flc1125 committed Dec 29, 2024
1 parent b382b31 commit ce8cee9
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion webhook/dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ func (d *Dispatcher) RegisterBugCreateListener(listeners ...BugCreateListener) {
func processEvent[L, E any](ctx context.Context, listeners []L, event E, fn func(L, E) error) error {

Check warning on line 95 in webhook/dispatcher.go

View check run for this annotation

Codecov / codecov/patch

webhook/dispatcher.go#L95

Added line #L95 was not covered by tests
eg, ctx := errgroup.WithContext(ctx)

Check failure on line 96 in webhook/dispatcher.go

View workflow job for this annotation

GitHub Actions / lint

ineffectual assignment to ctx (ineffassign)
for _, listener := range listeners {

Check warning on line 97 in webhook/dispatcher.go

View check run for this annotation

Codecov / codecov/patch

webhook/dispatcher.go#L97

Added line #L97 was not covered by tests
listener := listener
eg.Go(func() error {
return fn(listener, event)

Check warning on line 99 in webhook/dispatcher.go

View check run for this annotation

Codecov / codecov/patch

webhook/dispatcher.go#L99

Added line #L99 was not covered by tests
})
Expand Down

0 comments on commit ce8cee9

Please sign in to comment.