Skip to content

feat: create a new repository during init when --repo is not provided#147

Open
angeloashmore wants to merge 3 commits intomainfrom
aa/create-repo-during-init
Open

feat: create a new repository during init when --repo is not provided#147
angeloashmore wants to merge 3 commits intomainfrom
aa/create-repo-during-init

Conversation

@angeloashmore
Copy link
Copy Markdown
Member

@angeloashmore angeloashmore commented Apr 18, 2026

Resolves: #138

Description

The init command now creates a new repository when --repo is not provided, instead of failing with a missing flag error. Use --repo to connect to an existing repository.

Checklist

  • A comprehensive Linear ticket, providing sufficient context and details to facilitate the review of the PR, is linked to the PR.
  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1


Note

Medium Risk
Changes prismic init to provision a new Prismic repository via API calls when no --repo/legacy repo is provided, which affects onboarding flow and could fail due to network/auth conditions. Risk is moderated by retaining existing --repo validation and adding test coverage for the new path.

Overview
prismic init no longer requires --repo; when no repo is provided (and none is found in legacy slicemachine.config.json), it now creates a new Prismic repository and then writes prismic.config.json using the generated domain.

Repository creation logic is refactored into a reusable createRepo() helper (used by both prismic init and prismic repo create), and init only performs repo access/Type Builder checks when connecting to an existing repo. Error messaging for unsupported frameworks is also updated, and tests now assert the auto-create init flow (including an 8-char generated repo name).

Reviewed by Cursor Bugbot for commit b04d05f. Bugbot is set up for automated code reviews on this repo. Configure here.

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6990f7e. Configure here.

Comment thread src/adapters/index.ts
@lihbr
Copy link
Copy Markdown
Member

lihbr commented Apr 20, 2026

Was confused reading the WIP doc about that, great to see it's coming :)

angeloashmore and others added 2 commits April 21, 2026 11:01
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

repo create → init handoff is fragile

2 participants