From a36a6babff9c00c51a637e1c7b8c99df8dd7a959 Mon Sep 17 00:00:00 2001 From: whywaita Date: Mon, 2 Aug 2021 17:38:13 +0900 Subject: [PATCH] return err if already deleted target in repository --- pkg/web/webhook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/web/webhook.go b/pkg/web/webhook.go index 75c4229..d03e2ed 100644 --- a/pkg/web/webhook.go +++ b/pkg/web/webhook.go @@ -155,7 +155,7 @@ func searchRepo(ctx context.Context, ds datastore.Datastore, gheDomain, repo str repoTarget, err := ds.GetTargetByScope(ctx, gheDomain, repo) if err == nil && repoTarget.CanReceiveJob() { return repoTarget, nil - } else if err != datastore.ErrNotFound { + } else if err != nil && err != datastore.ErrNotFound { return nil, fmt.Errorf("failed to get target from repo: %w", err) }