-
Notifications
You must be signed in to change notification settings - Fork 21
Fix/887 self hosted provider resolution #529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
quentinlebourles-packmind
merged 17 commits into
main
from
fix/887-self-hosted-provider-resolution
Sep 30, 2026
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
57d2375
✨ feat(node-utils): tell whether a git remote and a provider URL are …
quentinlebourles-packmind dc8bd6d
✨ feat(git): resolve a CLI remote against the providers of its host
quentinlebourles-packmind 05b2968
✨ feat(git): adopt a self-hosted CLI-managed repository into its toke…
quentinlebourles-packmind 8f57dc1
♻️ refactor(cli): let the server work out the git provider from the r…
quentinlebourles-packmind 7c1f29e
📝 docs: explain how a connection takes over repositories the CLI reco…
quentinlebourles-packmind a727fd5
🐛 fix(git): keep the whole group path of a GitLab subgroup remote
quentinlebourles-packmind 8de4e42
🚨 fix(integration-tests): stop asserting on the logger in the self-ho…
quentinlebourles-packmind ff02863
🐛 fix(node-utils): read a bracketed IPv6 host as a whole
quentinlebourles-packmind da936af
🐛 fix(git): delete an emptied CLI-managed provider in one statement
quentinlebourles-packmind 36f7be2
🐛 fix(git): accept an scp-like remote naming an absolute path
quentinlebourles-packmind 9f7a724
🐛 fix(git): match a remote of an instance installed under a path prefix
quentinlebourles-packmind b666124
♻️ refactor(git): bind the provider id in the live-repository subquery
quentinlebourles-packmind a1cb362
🐛 fix(git): read a path prefix as its own connection's only
quentinlebourles-packmind c09b37d
🐛 fix(git): harden self-hosted resolution against legacy and prefixed…
quentinlebourles-packmind 78e37a2
🐛 fix(node-utils): read a remote sent without a scheme again
quentinlebourles-packmind b54d30d
🐛 fix(git): read a tracked owner on the remote's host only
quentinlebourles-packmind a1a4322
✅ test(cli-e2e): gate install-at-a-version above the published 0.36.1
quentinlebourles-packmind File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
apps/cli/src/application/useCases/trackRepository/parseOwnerRepo.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import { parseOwnerRepo } from './TrackRepositoryUseCase'; | ||
|
|
||
| describe('parseOwnerRepo', () => { | ||
| describe('when the remote has a GitLab subgroup', () => { | ||
| it('keeps the whole group path as owner for an HTTPS remote', () => { | ||
| expect( | ||
| parseOwnerRepo('https://gitlab.com/promyze/sandbox/quentin-nuxt.git'), | ||
| ).toEqual({ owner: 'promyze/sandbox', repo: 'quentin-nuxt' }); | ||
| }); | ||
|
|
||
| it('keeps the whole group path as owner for an scp-like SSH remote', () => { | ||
| expect( | ||
| parseOwnerRepo('git@gitlab.com:promyze/sandbox/quentin-nuxt.git'), | ||
| ).toEqual({ owner: 'promyze/sandbox', repo: 'quentin-nuxt' }); | ||
| }); | ||
| }); | ||
|
|
||
| it('parses a plain owner/repo remote', () => { | ||
| expect(parseOwnerRepo('https://github.com/owner/repo.git')).toEqual({ | ||
| owner: 'owner', | ||
| repo: 'repo', | ||
| }); | ||
| }); | ||
|
|
||
| describe('when an scp-like remote names an absolute path', () => { | ||
| it('ignores the leading slash', () => { | ||
| expect(parseOwnerRepo('git@gitlab.acme.io:/acme/app.git')).toEqual({ | ||
| owner: 'acme', | ||
| repo: 'app', | ||
| }); | ||
| }); | ||
| }); | ||
|
|
||
| describe('when the remote has no owner', () => { | ||
| it('throws', () => { | ||
| expect(() => parseOwnerRepo('https://github.com/repo')).toThrow( | ||
| 'Unable to parse git remote URL: https://github.com/repo', | ||
| ); | ||
| }); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.