Conversation
|
I realised the repositories can still only be filtered by their URL, so I need to add support for filtering by name as well now. |
|
I haven't checked, but what about the delete confirmation? Should deletion still be confirmed by URL if a name is present, or should then (only) the name be used? Let's discuss with the team. |
I can do either; it's URL confirmation only for now. We didn't actually discuss this with the team today, so which way do you want it, @sschuberth? |
I also forgot to ask: While this PR addresses #1599, it does not address #1368 yet (for the reason mentioned here) yet, correct? If so, the primary identifier of a repository stays to be the URL, and while that's the case, IMO also the URL should be used in the delete confirmation. Does that make sense to you as well, @Etsija? |
Yes it does. |
|
@sschuberth what's the status of this PR, could it be approved now? |
It changes areas of the backend code that I'd prefer others to review. I don't see a need to rush this until @mnonnenmacher is back on Monday, but of course @eclipse-apoapsis/bosch is welcome to review, too. |
5e4b1dd to
b260f0c
Compare
1. Adding a new repository: an optional name can be given
2. Editing repository details: you can add/modify/delete the name
3. The name (if given) is seen in the repository details page and breadcrumb
4. In product repositories table, name is also shown in case it exists
Please see the commits for details.
NOTE1: @sschuberth I didn't yet remove the repository ID - maybe @hanna-modica could tell if it's still needed for the CLI usage? We could provide with something handier for copying the URL needed for the CLI.
NOTE2: Although the API commit is marked as breaking (as it changes the API), it is not breaking as such, as the PR only adds an optional
nameto the GET/CREATE/UPDATE repository endpoints, and no back-filling to the database is needed.NOTE3: This PR also resolves #1368 by relaxing the uniqueness requirement of the repositories: now triplet
(product_id, url, name)must be unique, so there can be multiple repositories with the same URL inside a product if their names differ. It was also tested manually in the UI that creating a repository with the same URL and omitting the name gives is prevented: