Add remote repository publish and discovery support #2482
Mergedjuliusmarmingemerged 7 commits into
main fromrefs/pull/2482/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
- apps/server/src/sourceControl/SourceControlRepositoryService.ts line 295OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -0,0 +275,21 @@275+ cwd: input.cwd,276+ args: ["rev-parse", "--verify", "HEAD"],277+ })278+ .pipe(279+ Effect.map(() => true),280+ Effect.catch(() => Effect.succeed(false)),281+ );282+ if (!hasCommits) {283+ const details = yield* git284+ .statusDetails(input.cwd)285+ .pipe(Effect.catch(() => Effect.succeed(null)));286+ return {287+ repository: toRepositoryInfo(providerKind, urls),288+ remoteName,289+ remoteUrl,290+ branch: details?.branch ?? "main",291+ status: "remote_added" as const,292+ };293+ }294+295+ const pushResult = yield* git.pushCurrentBranch(input.cwd, null);
- apps/server/src/sourceControl/GitLabCli.ts line 177Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -174,4 +184,3 @@174184 function decodeGitLabJson<S extends Schema.Top>(175185 raw: string,176186 schema: S,177- operation: "getRepositoryCloneUrls" | "getDefaultBranch",
- apps/server/src/sourceControl/GitLabCli.test.ts line 248Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -219,0 +228,21 @@228+ path_with_namespace: "octocat/t3code",229+ web_url: "https://gitlab.com/octocat/t3code",230+ http_url_to_repo: "https://gitlab.com/octocat/t3code.git",231+ ssh_url_to_repo: "git@gitlab.com:octocat/t3code.git",232+ }),233+ ),234+ ),235+ );236+237+ const glab = yield* GitLabCli.GitLabCli;238+ const result = yield* glab.createRepository({239+ cwd: "/repo",240+ repository: "octocat/t3code",241+ visibility: "public",242+ });243+244+ assert.deepStrictEqual(result, {245+ nameWithOwner: "octocat/t3code",246+ url: "https://gitlab.com/octocat/t3code.git",247+ sshUrl: "git@gitlab.com:octocat/t3code.git",248+ });
- @@ -1188,3 +1322,16 @@11881322 </DialogPopup>11891323 </Dialog>119013241325+ <Dialog1326+ open={isPublishDialogOpen}1327+ onOpenChange={(open) => {1328+ setIsPublishDialogOpen(open);1329+ if (!open) {1330+ setPublishRemoteName("origin");1331+ setPublishRepository("");1332+ setHasUserEditedPublishRepository(false);1333+ setPublishWizardStep(0);1334+ setPublishAdvancedOpen(false);1335+ setPublishError(null);1336+ setPublishResult(null);1337+ }
juliusmarminge merged thisd796926
juliusmarminge closed this
Sign in to join this conversation.



Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
190b8775-91e2-49d3-8e90-a5c923379be3You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands and usage tips.