Skip to content

Commit

Permalink
return err if already deleted target in repository
Browse files Browse the repository at this point in the history
  • Loading branch information
whywaita committed Aug 2, 2021
1 parent da1f4df commit a36a6ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/web/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit a36a6ba

Please sign in to comment.