Pass the resolved destination credential through GetOrCreate to the push helper. Cover App and configured tokens on github.com and Enterprise Server, API failures, and the backup call chain.
* feat(destination): add WebDAV destination
Add a stdlib-only WebDAV destination mirroring the s3/azureblob flow:
bare-clone into a temp dir, optional zip, upload via HTTP PUT with Basic
auth, and prune stale remote files via PROPFIND/DELETE.
- types: WebDAVRepo struct, Destination.WebDAV field, Count()
- webdav: new package (UploadDirToWebDAV, DeleteObjectsNotInRepo)
- main: dispatch loop on par with azureblob
- conf.example.yml + gickup_spec.json: document the new destination
* feat: auto retry
Auto retry network errors and some situations.
Servers that disable Depth: infinity (Sabre/DAV, Nextcloud and others
answer 400/403/501) failed listing and could not prune stale files.
Try infinity once, fall back to recursive PROPFIND walk on rejection.
* refactor: use gowebdav client
Classify retry errors and make backoff interruptible.
* Adds Radicle destination
This destination allows mirroring repositories into the storage of a local
[Radicle](https://radicle.network) node.
Requires `git` + Radicle Command Line Interface (CLI) tools installed,
i.e. `rad` and `git-remote-rad` binaries. See https://radicle.network/install .
The repository is initialized with `rad init` on the first run and pushed
through the `git-remote-rad` helper afterwards, so the refs are signed with
the key of the Radicle profile.
Because every backup run works on a fresh temporary clone, each run has to
find the Repository ID (RID) created for an upstream on an earlier run:
every mirror records its upstream URL in a "dev.gickup" extension of the
signed Radicle identity document `payload`, and the storage is scanned for a
repository whose recorded source matches and whose refs are signed by this
profile's key — comparable to the existence lookups the forge destinations
make against their APIs, just against local storage. (Local-first, For The Win!)
Unlike other forge destinations we cannot use go-git for pushing,
because Radicle repositories are only reachable through the `git-remote-rad`
remote helper, which go-git does not support. All storage-touching
operations therefore shell out to the system `git` and `rad` binaries, so
identity creation and signed-refs handling stay inside the Radicle tooling.
Signed-off-by: Yorgos Saslis <yorgos.work@proton.me>
* fixup! Adds Radicle destination
Signed-off-by: Yorgos Saslis <yorgos.work@proton.me>
* fixup! Adds Radicle destination
Signed-off-by: Yorgos Saslis <yorgos.work@proton.me>
---------
Signed-off-by: Yorgos Saslis <yorgos.work@proton.me>
Co-authored-by: Andreas Wachter <andreas.wachter@buddyspencer.monster>
* feat: Add GitHub App support for authentication in configuration and code
* feat: Enhance GitHub App support by updating repository fetching logic and authentication method
* test: Update dependencies, enhance configuration handling, and add GitHub client tests
- Updated dependencies in go.sum to latest versions for improved stability and security.
- Added a defer statement to close the configuration file in readConfigFile function to prevent resource leaks.
- Implemented unit tests for GenRepo's HasAppAuth method to validate authentication conditions.
- Created new tests for the GitHub client to verify behavior with and without authentication tokens, including handling of invalid and missing private key files.
* feat: Exclude G101 gosec warning for github/github_test.go
* fixed go.mod and go.sum
---------
Co-authored-by: Andreas Wachter <andreas.wachter@buddyspencer.monster>
* added apprise
* fixed yaml type, check for / at the end of url
* return error message
* adapted example config and gickup_spec
* re-format spec
* Revert "re-format spec"
This reverts commit b938a0587e.
* fix spec
* implemented mirror using gickup and not giteas mirror function
* added "mirror" to gogs
* push to gogs
* mirror is now a struct
* move deprecation notice, no need to spam
* added git lfs for mirrors
* added openssh-client to ubuntu image
* working push on all branches
* fetch after clone and before pull to get all branches
* checkout all branches is not needed
* fix fetch
* added any module
* update dependencies
* clone local repos too
* fixed the separator and adjusted example config and README.md
* go mod tidy
* ran gofumpt and goimports
* cleaned up a bit and implemented timeformat as environment variable