ecommerce-app/.gitapp/operations/delete-record.yaml

21 lines
487 B
YAML

name: delete-record
version: 1
scope:
subtree: "collections/"
input:
$schema: zod
schema: |
z.object({
collection: z.string().min(1),
id: z.string().min(1)
})
preconditions:
- type: path_exists
path: "collections/${input.collection}/${input.id}.json"
mutations:
- type: delete_file
path: "collections/${input.collection}/${input.id}.json"
commit:
message: "feat(data): delete ${input.collection} record ${input.id}"
updateRef: "refs/heads/main"