Merge pull request #2380 from souleb/fix-panic-orgref-var

Fix panic on bootstrap when orgRef is not retrieved
This commit is contained in:
Stefan Prodan 2022-02-04 10:29:26 +02:00 committed by GitHub
commit 9bddabf4ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)