-
Notifications
You must be signed in to change notification settings - Fork 365
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
Add StorageID to Repo endpoints #8506
Add StorageID to Repo endpoints #8506
Conversation
…e-id-to-repo-endpoints
…e-id-to-repo-endpoints
pkg/api/controller.go
Outdated
@@ -2055,6 +2059,7 @@ func (c *Controller) CreateRepository(w http.ResponseWriter, r *http.Request, bo | |||
CreationDate: newRepo.CreationDate.Unix(), | |||
DefaultBranch: newRepo.DefaultBranch, | |||
Id: newRepo.Name, | |||
StorageId: swag.String(newRepo.StorageNamespace), |
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.
storageNamespace?
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.
Good catch! 🙈
Fixed.
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.
Looks great!
Lets add controller tests for ListRepositories
…e-id-to-repo-endpoints
There are no such tests covering StorageNamespace in the controller tests, so I don't think we should add ones for StorageID. It's covered by Esti - let's added it when we get there. |
…e-id-to-repo-endpoints
@N-o-Z can you please re-review? |
* Add StorageID to Repository entity * Bug fixes * Remove API changes * Almost empty commit * Revert almso empty commit * Remove from API * Fix PR comments * Fix tests * Update tests * Allow only empty StorageID * Revert "Allow only empty StorageID" This reverts commit 298bc0d. * Revert "Revert "Allow only empty StorageID"" This reverts commit 299c292. * Change validation * Remove StorageID in a test * Add StorageID to Repo endpoints (#8506) * Add StorageID to Repo endpoints * Add param to Creation * Add basic unit-tests * Fix param * Update tests
No description provided.