-
Notifications
You must be signed in to change notification settings - Fork 89
Improve get filtered repositories code #1280
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
Merged
Changes from 45 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
bd80ddd
metadata
sverdlov93 596a766
metadata
sverdlov93 83cdb96
Merge branch 'dev' into fix-template
sverdlov93 130c814
Merge branch 'dev' into fix-template
sverdlov93 3565983
metadata
sverdlov93 511132a
Merge remote-tracking branch 'sverdlov93/fix-template' into fix-template
sverdlov93 e13f31e
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli-core into fi…
sverdlov93 e92075b
metadata
sverdlov93 feac980
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli-core into fi…
sverdlov93 0646e8e
metadata
sverdlov93 42686b8
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli-core into fi…
sverdlov93 12bee92
metadata
sverdlov93 ea701bf
metadata
sverdlov93 2a13aa6
Remove redundant log
sverdlov93 cac58da
Remove redundant log
sverdlov93 3a3fe87
Remove redundant log
sverdlov93 ed6b3d2
Remove redundant log
sverdlov93 45b1e18
Remove redundant log
sverdlov93 c5eaad2
Remove redundant log
sverdlov93 0d0241a
Remove redundant log
sverdlov93 9f04ee3
Remove redundant log
sverdlov93 9906505
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli-core into fi…
sverdlov93 2e464c7
Remove redundant log
sverdlov93 dcd034a
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli-core into fi…
sverdlov93 099ae81
Remove redundant log
sverdlov93 5856ad9
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli-core into fi…
sverdlov93 4edd481
Remove redundant log
sverdlov93 b612100
Remove redundant log
sverdlov93 5c3a7f7
Remove redundant log
sverdlov93 d6dbc56
Remove redundant log
sverdlov93 d3bfe11
Remove redundant log
sverdlov93 6e90b66
Remove redundant log
sverdlov93 f1c2bbd
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli-core into fi…
sverdlov93 41aa3e8
Remove redundant log
sverdlov93 64b7b91
Remove redundant log
sverdlov93 b205894
Remove redundant log
sverdlov93 3c71af3
Remove redundant log
sverdlov93 24ef29a
Remove redundant log
sverdlov93 ba8bebc
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli-core into fi…
sverdlov93 3691e30
Remove redundant log
sverdlov93 b72be6c
Remove redundant log
sverdlov93 e99595c
Remove redundant log
sverdlov93 8444dbb
Remove redundant log
sverdlov93 d2207be
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli-core into fi…
sverdlov93 fc7a8e6
Improve repositores code
sverdlov93 db9e0ca
Improve repositores code
sverdlov93 d9064a0
Improve repositores code
sverdlov93 6dbf522
Update common/commands/configfile.go
sverdlov93 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| package commands | ||
|
|
||
| import ( | ||
| "fmt" | ||
| "github.com/jfrog/jfrog-client-go/artifactory/services" | ||
| "os" | ||
| "path/filepath" | ||
| "strconv" | ||
|
|
@@ -134,10 +136,10 @@ func createBuildConfig(global bool, confType project.ProjectType, configFile *Co | |
| } | ||
| // Populate, validate and write the config file | ||
| configFilePath := filepath.Join(projectDir, confType.String()+".yaml") | ||
| if err := configFile.VerifyConfigFile(configFilePath); err != nil { | ||
| if err = configFile.VerifyConfigFile(configFilePath); err != nil { | ||
| return err | ||
| } | ||
| if err := handleInteractiveConfigCreation(configFile, confType); err != nil { | ||
| if err = handleInteractiveConfigCreation(configFile, confType); err != nil { | ||
| return err | ||
| } | ||
| if err = configFile.validateConfig(); err != nil { | ||
|
|
@@ -649,7 +651,19 @@ func getRepositories(serverId string, repoTypes ...utils.RepoType) ([]string, er | |
| return nil, err | ||
| } | ||
|
|
||
| return utils.GetRepositories(artDetails, repoTypes...) | ||
| sm, err := utils.CreateServiceManager(artDetails, 3, 0, false) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| repos := []string{} | ||
| for _, repoType := range repoTypes { | ||
| filteredRepos, err := utils.GetFilteredRepositoriesWithFilterParams(sm, nil, nil, services.RepositoriesFilterParams{RepoType: repoType.String()}) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("failed getting %s repositories list: %w", repoType, err) | ||
| } | ||
| repos = append(repos, filteredRepos...) | ||
| } | ||
| return repos, nil | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just moved from repoutils to here |
||
| } | ||
|
|
||
| func defaultIfNotSet(c *cli.Context, flagName string, defaultValue string) string { | ||
|
|
||
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.