git lfs adds http.extraHeader to object downloads, which already carry an
Authorization header from the LFS batch response. gitlab.com rejects the
duplicate header with 400, so no LFS objects were downloaded since #425.
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.
Both ScanAndCollect calls dropped their error. ScanAndCollect returns
whatever it managed to collect alongside the error, so a failed or
partial ListDescendantGroups left subgroups short without saying so, and
the include/exclude org maps were built from an incomplete list. For
includeorgs that silently drops repos from the backup set.
The GetGroup call seven lines above each of these already logs and
continues on error, so this matches the surrounding code.
* 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.
* slightly refactor prune function for testing
* add tests for pruning function
* fix keep-Logic: All timestamp-prefixed-Folders will be grouped into one generation to keep.
Fixes#415
Side effect: This will delete all folders `<timestamp>.<anything>` in the repo directory, not only `timestamp.issues`
* correct tests for CI, fix typo
* add test for no pruning needed
* 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>
Gitlab supports nesting subgroups up to 20 levels deep. However, these
two filters were actually applied to projects in the provided
organization/group as well as projects in any immediate subgroup, but
not to projects in more deeply nested subgroups. Presumably, the
original intention of these filters was that the entire
organization/group would be either included or excluded, not only
projects in the group and its immediate subgroups.
Fix by using ListDescendantGroups() to get all descendant/nested groups.
Also, use gitlab.ScanAndCollect() to handle paginated results.
* 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>
* Rework of the BitBucket source authentication:
* Renamed 'user' to 'organization' as it better reflects the bitbucket architecture
* Added email config field, used fetch the workspace repo list with API token auth
* Added error log line in case workspace repo list fetch fails
* go-bitbucket version bump to 0.10.0
* fixed linting error
* ran go mod tidy to cleanup unused deps
* chore: bump action versions in workflows to latest stable releases
* fix: add revive var-naming exclusion for zip_test.go
* fix: correct formatting and structure in .goreleaser.yml
* fix: ensure fetch-depth is set for actions/checkout in workflow
* fix: update GoReleaser conditions for tag-based releases in workflow