Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions internal/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ func (c *Collector) Collect(ctx context.Context, u *url.URL, jobID string) ([]si
case errors.Is(err, projectrepo.ErrNoRepoFound):
fallthrough
case errors.Is(err, projectrepo.ErrRepoInaccessible):
// TODO: replace %v with %w after upgrading Go from 1.19 to 1.21
return nil, fmt.Errorf("%w (%s): %v", ErrUncollectableRepo, u, err)
return nil, fmt.Errorf("%w (%s): %w", ErrUncollectableRepo, u, err)
default:
return nil, fmt.Errorf("resolving project: %w", err)
}
Expand Down
6 changes: 2 additions & 4 deletions internal/collector/github/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@ func (f *factory) New(ctx context.Context, u *url.URL) (projectrepo.Repo, error)
}
if err := r.init(ctx); err != nil {
if errors.Is(err, githubapi.ErrGraphQLNotFound) {
// TODO: replace %v with %w after upgrading Go from 1.19 to 1.21
return nil, fmt.Errorf("%w (%s): %v", projectrepo.ErrNoRepoFound, u, err)
return nil, fmt.Errorf("%w (%s): %w", projectrepo.ErrNoRepoFound, u, err)
} else if errors.Is(err, githubapi.ErrGraphQLForbidden) {
// TODO: replace %v with %w after upgrading Go from 1.19 to 1.21
return nil, fmt.Errorf("%w (%s): %v", projectrepo.ErrRepoInaccessible, u, err)
return nil, fmt.Errorf("%w (%s): %w", projectrepo.ErrRepoInaccessible, u, err)
} else {
return nil, err
}
Expand Down
Loading