Skip to content

Commit

Permalink
Merge pull request #83 from whywaita/fix/81
Browse files Browse the repository at this point in the history
Check err is nil
  • Loading branch information
whywaita authored Aug 2, 2021
2 parents da1f4df + a36a6ba commit 9a63a24
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 9a63a24

Please sign in to comment.