add gitee backend#197
Open
jaemk wants to merge 1 commit into
Open
Conversation
- new `gitee` feature gating `backends::gitee` with `ReleaseList`/`Update` (and `AsyncUpdate` under `async`), mirroring the gitea backend. Default host `https://gitee.com` (api base `/api/v5`) with an optional `host(..)` setter for enterprise instances. (#121) - auth via `Authorization: Bearer <token>` (`auth_token`), host-gated and marked sensitive so the token never reaches logs, URLs, or error output. - lenient asset mapping: an asset missing `name` or `browser_download_url` (gitee's auto-generated source archive has no name) is skipped with a debug log instead of erroring; `tag_name`/`created_at` remain required. This deliberately diverges from the other forges' strict DTO handling. - `/releases/latest` is used directly; a non-semver or prefix-mismatched latest release falls back to scanning the listing. `tag_prefix` and non-semver-tag skipping work as on the other forges. - loopback stub tests (55) pin routing, pagination, DTO leniency, auth threading, and token non-leakage; example `examples/gitee.rs`; spec specs/ref-gitee-backend.md. Note: CI has no live gitee instance; correctness rests on the documented v5 API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #121.
giteefeature gatingbackends::giteewithReleaseList/Update(andAsyncUpdateunderasync), mirroring the gitea backend. Default hosthttps://gitee.com(api base/api/v5) with an optionalhost(..)setter for enterprise instances.Authorization: Bearer <token>(auth_token), host-gated and marked sensitive so the token never reaches logs, URLs, or error output. Verified against gitee's official client (oschina/mcp-gitee).nameorbrowser_download_urlis skipped with a debug log instead of erroring. Gitee's auto-generated source archive always appears inassetswithout a name (the issue's report), so strict handling would make every release unusable.tag_name/created_atremain required. This deliberately diverges from the other forges' strict DTO handling./releases/latestdirectly; a non-semver ortag_prefix-mismatched latest release falls back to scanning the listing. Non-semver tags are skipped as on the other forges.examples/gitee.rs;specs/ref-gitee-backend.md; thegiteefeature in all Makefile CI lanes.Note that CI has no live gitee instance: correctness rests on the documented v5 API and the loopback stubs. It would be good to have a gitee user validate a pre-release against a real repo before this ships in a release.