From 959ea6875aaae3ade5e442319e91fbc14123b0f2 Mon Sep 17 00:00:00 2001 From: Soule BA Date: Fri, 4 Feb 2022 09:06:41 +0100 Subject: [PATCH] Fix panic on bootstrap when orgRef is not retrieved If implemented, not retrieving an orgRef will always return an error Signed-off-by: Soule BA --- internal/bootstrap/bootstrap_provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/bootstrap/bootstrap_provider.go b/internal/bootstrap/bootstrap_provider.go index dd23f75f..5d57d4e9 100644 --- a/internal/bootstrap/bootstrap_provider.go +++ b/internal/bootstrap/bootstrap_provider.go @@ -275,7 +275,7 @@ func (b *GitProviderBootstrapper) reconcileOrgRepository(ctx context.Context) (g subOrgs, repoName := splitSubOrganizationsFromRepositoryName(b.repositoryName) orgRef, err := b.getOrganization(ctx, subOrgs) if err != nil { - return nil, fmt.Errorf("failed to create new Git repository for the organization %q: %w", orgRef.String(), err) + return nil, fmt.Errorf("failed to create new Git repository %q: %w", b.repositoryName, err) } repoRef := newOrgRepositoryRef(*orgRef, repoName) repoInfo := newRepositoryInfo(b.description, b.defaultBranch, b.visibility)