Skip to content

feat(cli): add github repo connection foundation - #8

Merged
AmanVarshney01 merged 8 commits into
mainfrom
aman/github-repo-connection-cli
May 20, 2026
Merged

feat(cli): add github repo connection foundation#8
AmanVarshney01 merged 8 commits into
mainfrom
aman/github-repo-connection-cli

Conversation

@AmanVarshney01

@AmanVarshney01 AmanVarshney01 commented May 11, 2026

Copy link
Copy Markdown
Member

summary

adds the cli foundation for connecting a resolved prisma project to a github repository through the server-side github app installation flow.

  • adds prisma git connect [git-url]
  • adds prisma git disconnect
  • detects the github repo from git remote origin when no url is passed
  • supports explicit project selection with --project <id-or-name>
  • lists workspace github app installations via the management api
  • creates an install intent when no usable github app installation exists
  • opens the github app install url and waits for approval in interactive mode
  • returns REPO_INSTALLATION_REQUIRED with the install url in json, ci, or non-interactive mode
  • handles stale/unavailable github app installation rows by starting a fresh install intent
  • links the project through POST /v1/source-repositories with projectId, providerRepositoryId, and installationId
  • makes repeated git connect runs idempotent when the project is already linked to the same repo

cli examples

prisma git connect
prisma git connect git@github.com:prisma/prisma-cli.git --project proj_123
prisma git connect https://github.com/prisma/prisma-cli --project proj_123
prisma git disconnect --project proj_123

not included

  • github webhook branch/pr automation
  • automatic app build/deploy/preview behavior
  • monorepo multi-app detection

@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

This PR adds a top-level git command group with git connect and git disconnect to link projects to GitHub repositories via GitHub App. It includes Git origin parsing, local state persistence, real/fixture controller logic (installation discovery, polling, POST/DELETE to management API), presenters, tests, and documentation.

Changes

GitHub Repository Connection Feature

Layer / File(s) Summary
Type definitions and data contracts
packages/cli/src/types/project.ts
GitRepositoryConnection defines repository identity, status, automation flags, and timestamps; ProjectRepositoryConnectionResult extends project show results with optional connection data.
Git utilities and GitHub URL parsing
packages/cli/src/adapters/git.ts, packages/cli/tests/git-adapter.test.ts
readGitOriginRemote shells out to git config with timeout; parseGitHubRepositoryUrl normalizes GitHub HTTPS, SSH shorthand, and ssh:// URLs, validates hostname/protocol/path, and strips .git suffix. Test suite covers multiple URL formats and rejection cases.
Local state persistence for repository connections
packages/cli/src/adapters/local-state.ts
Extends LocalState to track repositoryConnectionsByProject map per project ID; hydrates from persisted state.json; adds read/set/clear methods for state store operations.
Command registration and CLI wiring
packages/cli/src/commands/git/index.ts, packages/cli/src/cli.ts
Registers git as top-level command with connect and disconnect subcommands; each accepts --project option, with connect also accepting optional positional [git-url] argument; wires to controllers and presenters.
Command metadata and descriptors
packages/cli/src/shell/command-meta.ts
Adds git, git.connect, and git.disconnect entries to DESCRIPTORS registry with command paths, descriptions, and example invocations.
Result rendering and presenter functions
packages/cli/src/presenters/project.ts
renderGitConnect and renderGitDisconnect build mutate-style UI payloads with project/workspace/repository context; connect conditionally selects details message based on connection status.
Core connect/disconnect business logic
packages/cli/src/controllers/project.ts
runGitConnect and runGitDisconnect implement real/fixture mode branching: real mode authenticates, resolves project, validates GitHub URL, enumerates/matches SCM installations and repositories with pagination, handles install-intent creation and polling, creates/deletes source-repository connections via Management API; includes comprehensive error handling with status-specific guidance.
Unit and integration tests
packages/cli/tests/project-real-mode.test.ts, packages/cli/tests/project.test.ts, packages/cli/tests/git-adapter.test.ts
Real mode tests verify GitHub App connection with SCM installation/repository pagination, idempotency, install-intent creation, approval polling with browser open, access validation, and disconnect; fixture mode tests validate state persistence and error cases; adapter tests cover URL parsing.
Command specifications and conventions
docs/product/command-spec.md, docs/product/error-conventions.md, docs/product/output-conventions.md, docs/product/command-principles.md
Documents git connect and git disconnect with purpose, auth/project-resolution rules, GitHub URL parsing, Management API behavior, idempotency, interactive/non-interactive handling; adds stable MVP error codes for provider/installation/access failures; maps commands to mutate output pattern; lists git as stable command group.

🎯 4 (Complex) | ⏱️ ~60 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding GitHub repository connection functionality to the CLI as a foundational feature.
Description check ✅ Passed The description is directly related to the changeset, providing detailed context about the GitHub repo connection foundation being added.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch aman/github-repo-connection-cli
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch aman/github-repo-connection-cli

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

@AmanVarshney01 AmanVarshney01 changed the title add github repo connection cli foundation feat(cli): add github repo connection foundation May 18, 2026
@AmanVarshney01
AmanVarshney01 force-pushed the aman/github-repo-connection-cli branch from 0460d8d to f456141 Compare May 18, 2026 15:22
@AmanVarshney01
AmanVarshney01 marked this pull request as ready for review May 19, 2026 12:33

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/product/command-spec.md`:
- Line 253: The current sentence stating "enables platform webhook automation to
map GitHub branch activity to Prisma Branch state" should be made conditional to
reflect that automation only runs when the repository connection is active;
update the sentence in command-spec.md (the line containing that exact phrase)
to explicitly include the condition (for example: "...enables platform webhook
automation to map GitHub branch activity to Prisma Branch state when the
repository connection is active" or similar wording), ensuring the documentation
clearly ties automation behavior to the repository connection state.

In `@packages/cli/src/presenters/project.ts`:
- Around line 91-94: The presenter's message for connection.status currently
maps any non-"active" value to "pending GitHub App installation", which
mislabels states like "archived"; update the logic in
packages/cli/src/presenters/project.ts (the code that builds the connection
message using connection.status) to explicitly handle known statuses (e.g.,
"pending" -> "GitHub branch automation is pending GitHub App installation",
"archived" -> "GitHub branch automation has been archived" or similar), and fall
back to a generic message for unknown statuses; implement this using a small
switch or mapping keyed by connection.status so each known status is rendered
correctly and unknown ones have a clear default.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 00961753-9a94-4ecc-9e05-b55d3f6d08ae

📥 Commits

Reviewing files that changed from the base of the PR and between aef197d and 82a60e4.

📒 Files selected for processing (13)
  • docs/product/command-spec.md
  • docs/product/error-conventions.md
  • docs/product/output-conventions.md
  • packages/cli/src/adapters/git.ts
  • packages/cli/src/adapters/local-state.ts
  • packages/cli/src/commands/project/index.ts
  • packages/cli/src/controllers/project.ts
  • packages/cli/src/presenters/project.ts
  • packages/cli/src/shell/command-meta.ts
  • packages/cli/src/types/project.ts
  • packages/cli/tests/git-adapter.test.ts
  • packages/cli/tests/project-real-mode.test.ts
  • packages/cli/tests/project.test.ts

Comment thread docs/product/command-spec.md Outdated
Comment thread packages/cli/src/presenters/project.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/cli/src/controllers/project.ts`:
- Around line 657-674: The pagination loops in project.ts (the do/while blocks
that use the cursor variable to fetch "/v1/scm-installations" and the similar
loop around lines 687-710) must guard against repeated cursors to avoid infinite
loops; add a Set (e.g., seenCursors) to record each cursor value before
requesting the next page, and when computing the next cursor (from
data.pagination.nextCursor) check if it's already in seenCursors—if so, break or
throw a descriptive error instead of continuing; update both the installations
loop (where installations.push(...data.data) is used and cursor is set) and the
second pagination loop to use this same defensive check.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 88a7abe3-ab3f-4bac-82f0-125cf304dbab

📥 Commits

Reviewing files that changed from the base of the PR and between 82a60e4 and 3107564.

📒 Files selected for processing (3)
  • docs/product/command-spec.md
  • packages/cli/src/controllers/project.ts
  • packages/cli/tests/project-real-mode.test.ts

Comment thread packages/cli/src/controllers/project.ts

@luanvdw luanvdw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@AmanVarshney01 I've been playing around with these commands, and was wondering if we could simplify the verbiage here? Instead of using,

prisma project connect-repo [git url]
prisma project disconnect-repo

we could bring git into the command like this

prisma project git connect [git url]
prisma project git disconnect

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/cli/src/controllers/project.ts (1)

166-169: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Preserve real-mode idempotency semantics in fixture mode.

Line 169 always overwrites the stored connection. That makes fixture mode diverge from real mode: re-running git connect for the same repo should be a no-op, and connecting a different repo should raise REPO_ALREADY_CONNECTED instead of silently replacing state.

Suggested fix
   const target = await resolveProjectShowInFixtureMode(context, workspace, options.project);
   const repository = await resolveRepositoryForConnect(context, gitUrl);
+  const existingConnection = await context.stateStore.readRepositoryConnection(target.project.id);
+
+  if (existingConnection) {
+    if (repositoryFullNamesMatch(existingConnection.repository.fullName, repository.fullName)) {
+      return {
+        command: "git.connect",
+        result: {
+          ...target,
+          repositoryConnection: existingConnection,
+        },
+        warnings: [],
+        nextSteps: [],
+      };
+    }
+
+    throw repoAlreadyConnectedError(existingConnection.repository.fullName);
+  }
+
   const connection = createPendingRepositoryConnection(repository);
   await context.stateStore.setRepositoryConnection(target.project.id, connection);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/src/controllers/project.ts` around lines 166 - 169, The code
always overwrites the stored connection
(context.stateStore.setRepositoryConnection) causing fixture mode to diverge
from real mode; change it to first read the existing connection for
target.project.id (e.g., via context.stateStore.getRepositoryConnection) and: if
no existing connection, call createPendingRepositoryConnection(repository) and
set it; if an existing connection points to the same repository (compare
repository.id or gitUrl) treat it as a no-op; if it points to a different
repository throw the same REPO_ALREADY_CONNECTED error the real path would
raise. Use the existing symbols resolveProjectShowInFixtureMode,
resolveRepositoryForConnect, createPendingRepositoryConnection,
target.project.id and connection to locate and implement this check.
♻️ Duplicate comments (3)
docs/product/command-spec.md (1)

254-254: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Make automation enablement conditional in the behavior docs.

The current statement is absolute, but automation is only active when the repository connection is in an active state. The documentation should reflect this conditionality to avoid confusion about when webhook automation actually runs.

📝 Suggested wording
-- enables platform webhook automation to map GitHub branch activity to Prisma Branch state
+- when the connection is active, enables platform webhook automation to map GitHub branch activity to Prisma Branch state
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/product/command-spec.md` at line 254, Update the absolute sentence
"enables platform webhook automation to map GitHub branch activity to Prisma
Branch state" so it reflects conditional activation; change it to indicate that
webhook automation runs only when the repository connection is in an active
state (e.g., "enables platform webhook automation to map GitHub branch activity
to Prisma Branch state when the repository connection is active"), and ensure
any related phrasing nearby in command-spec.md uses the same conditional
language to avoid inconsistency.
packages/cli/src/presenters/project.ts (1)

90-94: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Handle archived separately in connect output.

Line 93 currently labels every non-active connection as “pending GitHub App installation”. The controller can also return archived, so archived repositories will be shown with the wrong state.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/src/presenters/project.ts` around lines 90 - 94, The current
presenter builds the details array using connection.status and treats any
non-"active" value as "pending GitHub App installation"; update the logic that
sets details (where connection.status is checked) to explicitly handle
"archived" (e.g., if connection.status === "archived" show a message like
"GitHub branch automation is archived for this project.") and keep the existing
messages for "active" and the fallback; locate the condition around
connection.status in the presenter (the details array construction) and add an
explicit branch for "archived" instead of the current binary active/else branch.
packages/cli/src/controllers/project.ts (1)

650-674: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Guard both pagination loops against non-advancing cursors.

Lines 673 and 709 still trust nextCursor progression completely. If the API repeats a cursor while hasMore stays true, git connect can hang indefinitely during installation or repository lookup.

Also applies to: 679-710

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/src/controllers/project.ts` around lines 650 - 674, The
pagination loop in listScmInstallations trusts pagination.nextCursor to always
advance and can hang if the API returns the same cursor repeatedly; update
listScmInstallations to detect non-advancing cursors by tracking the previous
cursor (e.g., prevCursor) and comparing it to the nextCursor returned from
data.pagination.nextCursor, and if nextCursor is equal to prevCursor (or
otherwise not changing) while hasMore is true, break and surface/throw a
descriptive repoConnectionApiError instead of looping indefinitely; apply the
same guard to the other pagination loop that uses cursor/nextCursor so both
loops bail on non-progressing cursors.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/product/command-spec.md`:
- Line 19: Change the lowercase "github" to the proper noun "GitHub" in the docs
string "provider-specific `github` group." — update the markdown so the phrase
reads "provider-specific `GitHub` group" (preserve backticks/inline code
formatting) wherever that exact snippet or symbol appears in the document.

---

Outside diff comments:
In `@packages/cli/src/controllers/project.ts`:
- Around line 166-169: The code always overwrites the stored connection
(context.stateStore.setRepositoryConnection) causing fixture mode to diverge
from real mode; change it to first read the existing connection for
target.project.id (e.g., via context.stateStore.getRepositoryConnection) and: if
no existing connection, call createPendingRepositoryConnection(repository) and
set it; if an existing connection points to the same repository (compare
repository.id or gitUrl) treat it as a no-op; if it points to a different
repository throw the same REPO_ALREADY_CONNECTED error the real path would
raise. Use the existing symbols resolveProjectShowInFixtureMode,
resolveRepositoryForConnect, createPendingRepositoryConnection,
target.project.id and connection to locate and implement this check.

---

Duplicate comments:
In `@docs/product/command-spec.md`:
- Line 254: Update the absolute sentence "enables platform webhook automation to
map GitHub branch activity to Prisma Branch state" so it reflects conditional
activation; change it to indicate that webhook automation runs only when the
repository connection is in an active state (e.g., "enables platform webhook
automation to map GitHub branch activity to Prisma Branch state when the
repository connection is active"), and ensure any related phrasing nearby in
command-spec.md uses the same conditional language to avoid inconsistency.

In `@packages/cli/src/controllers/project.ts`:
- Around line 650-674: The pagination loop in listScmInstallations trusts
pagination.nextCursor to always advance and can hang if the API returns the same
cursor repeatedly; update listScmInstallations to detect non-advancing cursors
by tracking the previous cursor (e.g., prevCursor) and comparing it to the
nextCursor returned from data.pagination.nextCursor, and if nextCursor is equal
to prevCursor (or otherwise not changing) while hasMore is true, break and
surface/throw a descriptive repoConnectionApiError instead of looping
indefinitely; apply the same guard to the other pagination loop that uses
cursor/nextCursor so both loops bail on non-progressing cursors.

In `@packages/cli/src/presenters/project.ts`:
- Around line 90-94: The current presenter builds the details array using
connection.status and treats any non-"active" value as "pending GitHub App
installation"; update the logic that sets details (where connection.status is
checked) to explicitly handle "archived" (e.g., if connection.status ===
"archived" show a message like "GitHub branch automation is archived for this
project.") and keep the existing messages for "active" and the fallback; locate
the condition around connection.status in the presenter (the details array
construction) and add an explicit branch for "archived" instead of the current
binary active/else branch.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0fa9c47f-7149-443d-ab55-ee18d4d4f82f

📥 Commits

Reviewing files that changed from the base of the PR and between 3107564 and 7e7d639.

📒 Files selected for processing (10)
  • docs/product/command-principles.md
  • docs/product/command-spec.md
  • docs/product/output-conventions.md
  • packages/cli/src/cli.ts
  • packages/cli/src/commands/git/index.ts
  • packages/cli/src/controllers/project.ts
  • packages/cli/src/presenters/project.ts
  • packages/cli/src/shell/command-meta.ts
  • packages/cli/tests/project-real-mode.test.ts
  • packages/cli/tests/project.test.ts

Comment thread docs/product/command-spec.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/product/command-spec.md (1)

261-261: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Simplify and standardize the mode terminology.

The phrase "non-interactive mode, JSON mode, or CI" should be simplified to "non-interactive or --json mode" for consistency with terminology used elsewhere in this document (e.g., lines 45, 73). "CI" is redundant since CI environments typically run with --no-interactive, and "JSON mode" should be styled as --json mode with backticks.

📝 Proposed fix
-in non-interactive mode, JSON mode, or CI, the CLI exits with `REPO_INSTALLATION_REQUIRED` and includes the install URL
+in non-interactive or `--json` mode, the CLI exits with `REPO_INSTALLATION_REQUIRED` and includes the install URL
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/product/command-spec.md` at line 261, Replace the phrase
"non-interactive mode, JSON mode, or CI" with "non-interactive or `--json` mode"
and style `--json` with backticks for consistency; update the sentence that
reads about exiting with `REPO_INSTALLATION_REQUIRED` so it now says the CLI
exits in non-interactive or `--json` mode with `REPO_INSTALLATION_REQUIRED` and
includes the install URL, removing the redundant "CI" wording.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/cli/tests/project.test.ts`:
- Around line 293-355: Read and store the repository connection object
immediately after the first successful connect by calling readFile on
path.join(stateDir, "state.json") and saving
state.project.repositoryConnectionsByProject.proj_123 into a variable (e.g.,
initialConnection); then in the same-repo test compare that initialConnection
against the parsed JSON result from the second executeCli call and against the
final state.json to ensure deep equality (no fields like connectedAt were
rewritten); apply the same pattern in the replacement test to assert the stored
object remains exactly the initialConnection when a conflicting connect fails.

---

Outside diff comments:
In `@docs/product/command-spec.md`:
- Line 261: Replace the phrase "non-interactive mode, JSON mode, or CI" with
"non-interactive or `--json` mode" and style `--json` with backticks for
consistency; update the sentence that reads about exiting with
`REPO_INSTALLATION_REQUIRED` so it now says the CLI exits in non-interactive or
`--json` mode with `REPO_INSTALLATION_REQUIRED` and includes the install URL,
removing the redundant "CI" wording.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6dae6461-003d-47ea-a59e-2c9dc05393bf

📥 Commits

Reviewing files that changed from the base of the PR and between 3efe52c and fab1244.

📒 Files selected for processing (3)
  • docs/product/command-spec.md
  • packages/cli/src/controllers/project.ts
  • packages/cli/tests/project.test.ts

Comment thread packages/cli/tests/project.test.ts
luanvdw
luanvdw previously approved these changes May 20, 2026

@luanvdw luanvdw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice work @AmanVarshney01! 🚀

@AmanVarshney01
AmanVarshney01 merged commit 3311de0 into main May 20, 2026
4 checks passed
wmadden-electric added a commit that referenced this pull request Aug 12, 2026
…k its only ones

Removing the fixture-mode tests removed the only coverage of `renderAuthSuccess` with it: no test file referenced it afterwards. The rendering is real behaviour that users see, so losing its tests along with the mode that happened to reach it was a regression, not a cleanup.

It is tested directly now rather than through whichever command calls it: the login rows, the rows omitted when there is no provider, user or workspace, the service-token labels for a credential with and without a name, signed-out, and the logout line.

Not addressed, with a reason: review also asked for the Git flow in `runGitConnect` to use the generated SDK client instead of `client as unknown as SourceRepositoryApiClient` and a hand-written method contract. That cast arrived in #8 and this branch only reindented it while unwrapping a fixture branch. Replacing it means checking whether the published SDK covers the source-repository paths at all, which is its own change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
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.

2 participants