Skip to content

fix: create gh repo in Initialization that the rest of the application expects#939

Open
Heinrich-XIAO wants to merge 1 commit intopingdotgg:mainfrom
Heinrich-XIAO:feature/git-init-create-github-repo
Open

fix: create gh repo in Initialization that the rest of the application expects#939
Heinrich-XIAO wants to merge 1 commit intopingdotgg:mainfrom
Heinrich-XIAO:feature/git-init-create-github-repo

Conversation

@Heinrich-XIAO
Copy link

@Heinrich-XIAO Heinrich-XIAO commented Mar 11, 2026

What Changed

Initialize Git created only a local repo, so push/PR was broken until you manually created a GitHub repo and origin.

Why

This fix is right because it makes the button create the complete state the app already assumes (local repo plus GitHub remote)

UI Changes

N/A

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes (N/A)
  • I included a video for animation/interaction changes (N/A)

Note

Create a private GitHub repo automatically during git init

  • The WS_METHODS.gitInit websocket handler in wsServer.ts now calls gitHubCli.createRepository with visibility: 'private' after git.initRepo, tying the response to the repository creation result.
  • Adds createRepository to the GitHubCli service interface and layer, invoking gh repo create --source=. --private --remote origin.
  • GitHubCliLive is added to the top-level layer in serverLayers.ts so it is available across the server runtime.
  • Behavioral Change: gitInit now fails if gh repo create fails, and a private GitHub remote repo is always created on every local repo init.

Macroscope summarized ec79ce1.

- add `GitHubCli.createRepository` to service and live layer
- call it from `gitInit` in ws server after local repo initialization
- cover behavior with ws server and GitHub CLI layer tests
@coderabbitai
Copy link

coderabbitai bot commented Mar 11, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b29b58fc-5f0f-4eaa-a614-46b0c8c36776

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Mar 11, 2026
@Heinrich-XIAO Heinrich-XIAO changed the title Create private GitHub repo during git init fix: create gh repo in Initialization that the rest of the application expects Mar 11, 2026
@Noojuno
Copy link
Contributor

Noojuno commented Mar 12, 2026

I don't think I would want this app making repos for me automatically tbh, I think the functionality might be worth adding as a popup that is triggered via the Git dropdown if no remote works but it's a little more complicated than just making a private repo by default and calling it a day.

For example, if I'm using T3 Code for a work project, I need to make the repo under the org for my work rather than my personal account, and they also need to have the --internal flag added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants