forgejo: add dump archive integration#27
Conversation
Signed-off-by: Iván Rodríguez <ivandejesus1806@gmail.com>
7f71865 to
8f5ec6d
Compare
Signed-off-by: Iván Rodríguez <ivandejesus1806@gmail.com>
|
Validation update: I added focused importer/exporter unit tests and tightened exporter path handling so restore rejects Re-ran locally after the update:
|
Signed-off-by: Iván Rodríguez <ivandejesus1806@gmail.com>
|
Small follow-up: I added an importer flow test that uses a fake Re-ran locally after the change: |
Alex-Parejo
left a comment
There was a problem hiding this comment.
One small hardening point: dump_type is passed to orgejo dump --type without validation, while �rchiveExtension() falls back to .zip for unknown values. So a typo like dump_type=tarz would run orgejo dump --type tarz but name/metadata the snapshot as orgejo-dump.zip. I would either validate dump_type against the supported set in NewImporter/schema or make �rchiveExtension return an error for unknown values, so failed config is explicit instead of producing mismatched archive metadata.
|
Clarifying my previous review comment, which got mangled by shell escaping:
Suggestion: validate |
Signed-off-by: Iván Rodríguez <ivandejesus1806@gmail.com>
|
Thanks for catching that. I pushed Changes:
Re-ran locally: |
Refs PlakarKorp/hub#4.
Summary
Adds a community Forgejo integration that uses Forgejo's built-in dump tooling:
forgejo://importer invokesforgejo dump --file ... --type ... --quietand stores the resulting archive in the snapshot./forgejo-dump.<type>plus/manifest.jsonmetadata.forgejo://exporter materializes snapshot records into a local output directory so the dump archive is ready for Forgejo's documented restore workflow.Validation
gofmton new Go filesgo test ./...go build -v -o forgejoImporter ./plugin/importergo build -v -o forgejoExporter ./plugin/exportergit diff --check -- forgejoNote: I validated compilation and package-level behavior locally. I did not run an end-to-end live Forgejo container restore in this environment.