forked from Gitlink/gitlink-cli
The contents/batch endpoint accepts multiple file operations per
commit, but each existing shortcut sent exactly one. file +batch
takes a JSON spec (array of {action_type, file_path, content,
encoding}) and applies them atomically in one commit:
gitlink-cli file +batch -s spec.json -b master -m 'batch ops'
Client-side validation: action_type must be create|update|delete,
file_path required. content/encoding are normalized for delete
entries — the server rejects entries missing content with
'请输入正确的文件参数Files' (production-reproduced).
Production-verified on gitlink.org.cn: 2-file create in one commit,
then 2-file delete in one commit. Unit test covers payload shape,
delete normalization, and action_type validation.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
||
|---|---|---|
| .. | ||
| cmd/check | ||
| locales | ||
| schema | ||
| args.go | ||
| doc.go | ||
| loader.go | ||
| locale.go | ||
| locale_test.go | ||
| options.go | ||
| resolver.go | ||
| resolver_test.go | ||
| template.go | ||
| template_test.go | ||
| translator.go | ||
| translator_test.go | ||
| validate.go | ||
| validate_test.go | ||