Skip to content

feat(apps): add apps:link and apps:unlink commands#141

Merged
robingenz merged 5 commits intomainfrom
feat/apps-link-unlink
Apr 4, 2026
Merged

feat(apps): add apps:link and apps:unlink commands#141
robingenz merged 5 commits intomainfrom
feat/apps-link-unlink

Conversation

@robingenz
Copy link
Copy Markdown
Member

@robingenz robingenz commented Apr 4, 2026

Summary

  • Add apps:link command to connect a git repository to an app by auto-detecting the provider, owner, and repository from the local git remote (origin)
  • Add apps:unlink command to disconnect a git repository from an app with confirmation prompt
  • Add git remote URL parser supporting GitHub, GitLab, Bitbucket, and Azure DevOps (HTTPS, SSH, Visual Studio URLs)

Test plan

  • All 138 tests pass (npm run test)
  • Build succeeds (npm run build)
  • Formatting verified (npm run fmt)
  • Manual test: run apps:link --appId <id> in a GitHub repo
  • Manual test: run apps:unlink --appId <id> --yes
  • Manual test: run apps:link interactively (no flags)

Copilot AI review requested due to automatic review settings April 4, 2026 15:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds new CLI capabilities to link/unlink an app to the current git repository by deriving provider/owner/repo from the local origin remote, and wires this through new app service endpoints.

Changes:

  • Introduce apps:link and apps:unlink commands (including interactive app selection + confirmation on unlink).
  • Add appsService.linkRepository / appsService.unlinkRepository and corresponding DTOs.
  • Add git remote URL parsing utility with test coverage for supported providers.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/utils/git.ts Implements reading origin remote and parsing provider/owner/repo (+ Azure project) from the URL.
src/utils/git.test.ts Adds unit tests covering several HTTPS/SSH git remote URL formats.
src/types/app.ts Adds DTOs for link/unlink repository operations.
src/services/apps.ts Adds HTTP calls for linking/unlinking repositories on apps.
src/index.ts Registers the new apps:link and apps:unlink commands.
src/commands/apps/link.ts Implements the apps:link CLI command using git remote auto-detection.
src/commands/apps/link.test.ts Adds tests for apps:link including selection flow and API error handling.
src/commands/apps/unlink.ts Implements the apps:unlink CLI command with confirmation prompt.
src/commands/apps/unlink.test.ts Adds tests for apps:unlink including confirmation flow and API error handling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@robingenz robingenz self-assigned this Apr 4, 2026
@robingenz robingenz added the feature Feature label Apr 4, 2026
@robingenz robingenz merged commit e37e2fe into main Apr 4, 2026
3 checks passed
@robingenz robingenz deleted the feat/apps-link-unlink branch April 4, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants