Skip to content

Commit

Permalink
Annotate errors from go-git-providers
Browse files Browse the repository at this point in the history
closes #3623

Signed-off-by: Max Jonas Werner <mail@makk.es>
  • Loading branch information
Max Jonas Werner committed Jul 3, 2023
1 parent d335f8f commit e43cbe2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/bootstrap/bootstrap_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ func (b *GitProviderBootstrapper) reconcileOrgRepository(ctx context.Context) (g
repo, err := b.provider.OrgRepositories().Get(ctx, repoRef)
if err != nil {
if !errors.Is(err, gitprovider.ErrNotFound) {
return nil, fmt.Errorf("failed to get Git repository %q: %w", repoRef.String(), err)
return nil, fmt.Errorf("failed to get Git repository %q: provider error: %w", repoRef.String(), err)
}
// go-git-providers has at present some issues with the idempotency
// of the available Reconcile methods, and setting e.g. the default
Expand Down Expand Up @@ -416,7 +416,7 @@ func (b *GitProviderBootstrapper) reconcileUserRepository(ctx context.Context) (
repo, err := b.provider.UserRepositories().Get(ctx, repoRef)
if err != nil {
if !errors.Is(err, gitprovider.ErrNotFound) {
return nil, fmt.Errorf("failed to get Git repository %q: %w", repoRef.String(), err)
return nil, fmt.Errorf("failed to get Git repository %q: provider error: %w", repoRef.String(), err)
}
// go-git-providers has at present some issues with the idempotency
// of the available Reconcile methods, and setting e.g. the default
Expand Down

0 comments on commit e43cbe2

Please sign in to comment.