Adds Ci::Catalog::Resources::DestroyService
What does this MR do and why?
Adds Ci::Catalog::Resources::DestroyService
- also adds the mutation that uses service
- adds a base mutation to catalog resource mutations for ease
- moves some files into appropriate places
😬 (inside the correct folder)
Changelog: added
How to set up and validate locally
=> project.catalog_resource
(...)
=> => #<Ci::Catalog::Resource:0x000000015763e810 id: 15, project_id: 38, created_at: Thu, 09 Nov 2023 13:26:21.114837000 UTC +00:00, state: "draft", latest_released_at: nil, name: "blank-project", description: nil>
With any project marked as a catalog resource (even a blank one just created), run the following migration:
mutation($id: ID!){
catalogResourcesDestroy(input: {projectPath:$id}) {
errors
}
}
with:
{
"id": "root/blank-project"
}
See that the association gets destroyed:
[2] pry(main)> project.catalog_resource
(....)
=> nil
No more badge:
No more toggle:
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Laura Montemayor