21 lines
496 B
YAML
21 lines
496 B
YAML
name: create-record
|
|
version: 1
|
|
scope:
|
|
subtree: "collections/"
|
|
input:
|
|
$schema: zod
|
|
schema: |
|
|
z.object({
|
|
collection: z.string().min(1),
|
|
id: z.string().min(1),
|
|
data: z.record(z.unknown())
|
|
})
|
|
preconditions: []
|
|
mutations:
|
|
- type: create_file
|
|
path: "collections/${input.collection}/${input.id}.json"
|
|
content: "${JSON.stringify(input.data, null, 2)}"
|
|
commit:
|
|
message: "feat(data): create ${input.collection} record ${input.id}"
|
|
updateRef: "refs/heads/main"
|