-
Notifications
You must be signed in to change notification settings - Fork 151
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
feat: Add parseGitHubPath() to parse URI in GithubRegistry #656
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 281fc76 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
||
this.repoOwner = repoOwner; | ||
this.repoName = repoName; | ||
this.branch = options.branch ?? repoBranch ?? 'main'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we raise an error if both options.branch
and repoBranch
are passed?
test/unit/registry.test.ts
Outdated
useProxy: true, | ||
expectedRegistries: [ | ||
{ type: GithubRegistry, uri: DEFAULT_GITHUB_REGISTRY, proxyUrl: PROXY_DEPLOYED_URL }, | ||
{ type: FileSystemRegistry, uri: localPath }, | ||
{ type: GithubRegistry, uri: 'https://github.com/test' }, | ||
{ type: GithubRegistry, uri: 'https://github.com/user/test' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test case here that includes the branch in the URL?
abeed73
to
55e7409
Compare
Description
Update GithubRegistry to be able to parse branch from URI by using a helper function. The function uses regex instead of split/positional arrays because we may have branches that look like:
ltyu/REZ/base-ethereum
Drive-by
Some lint updates
Backward compatibility
Yes - moved the existing parsing logic to a helper function that uses regex instead of positional arrays.
Testing
Unit test