feat(review-platform): add Gitee support - #2840
Open
guantw wants to merge 1 commit into
Open
Conversation
guantw
marked this pull request as draft
September 6, 2026 11:37
guantw
force-pushed
the
feat/gitee-review-platform
branch
from
September 6, 2026 20:17
64de03e to
172ccf2
Compare
guantw
marked this pull request as ready for review
September 6, 2026 20:18
guantw
marked this pull request as draft
September 6, 2026 20:23
Add a Gitee API v5 provider for pull requests, issue evidence, check output, comments, approval, and resetting the current user's approval. Integrate provider identity with the existing review tools and Deep Review routing. Filter Gitee pull requests before pagination, distinguish open requests from drafts, and populate statistics for the visible page with bounded concurrency. Keep unknown counts distinct from zero, preserve valid metadata on enrichment failure, and bind list/detail statistics and caches to matching PR revisions. Bind review diffs to immutable revisions, report potentially capped file and commit collections, and preserve section coverage warnings. Keep Gitee credentials in a separate store for downgrade compatibility and redact URLs from transport errors. Advertise state filtering support for older hosts. Document supported operations and add HTTP contract, compatibility, frontend, public read-only smoke, and native desktop workflow coverage.
guantw
force-pushed
the
feat/gitee-review-platform
branch
from
September 6, 2026 22:05
172ccf2 to
5aa1075
Compare
guantw
marked this pull request as ready for review
September 6, 2026 22:06
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.
Summary
Add Gitee to the existing review-platform service, Pull Requests panel, Agent tools, and Deep Review flow.
gitee.comremotes and support PR lists/details, files and diffs, commits, comments, check output, and Issue evidence.GITEE_TOKEN, with a separate credential file for downgrade compatibility and query-token redaction in transport errors.Fixes #
Type and Areas
Type: Feature
Areas: Rust review-platform integration, desktop/Tauri, Agent tools, Deep Review, Web UI, i18n, documentation, tests.
Motivation / Impact
Repositories hosted on Gitee can use the existing review workflow with provider-native identities. Public repositories can be read anonymously; authenticated access and writes use the configured Gitee token and repository permissions.
State chips query the repository's matching PRs instead of filtering the ten rows on the current page. The panel keeps state-specific pagination and caches and prevents stale asynchronous detail work from following a previous selection. Older hosts retain the All request shape; hosts without the advertised filtering capability show an explicit unsupported state for other Gitee filters.
Users can see available file/addition/deletion counts on the initial list without selecting each PR. Unknown statistics display a dash, while confirmed zero remains zero. Missing, invalid, overflowing, or incomplete file counts cannot become authoritative totals, and valid PR metadata is retained when enrichment cannot establish a complete result. Legacy provider overviews can still replace nonzero totals with zero.
The adapter conservatively marks collections of 200 files or 250 commits as potentially incomplete. Live large-PR file responses stopped at 200 and ignored pagination parameters despite the schema's advertised 300-file limit. Deep Review retains limited coverage instead of claiming a complete review. If approval succeeds but its accompanying comment fails, the result identifies the applied approval and directs the caller to retry only the comment.
Verification
Focused automated checks passed on Windows:
cargo test --locked -p openbitfun-services-integrations --no-default-features --features review-platform --lib review_platformcargo test --locked -p openbitfun-agent-runtime --no-default-features --features agent-runtime --lib deep_review::target_evidence::cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,tools-git --lib review_platform_tool::cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,tools-git --lib pull_request_diff_route_uses_prepared_provider_identity_not_remote_idpnpm --dir src/web-ui exec vitest run src/infrastructure/api/service-api/ReviewPlatformAPI.test.tspnpm --dir src/web-ui exec vitest run src/app/components/panels/review-platform/ReviewPlatformPanel.test.ts src/app/components/panels/review-platform/ReviewPlatformPanel.test.tsxpnpm run check:webpnpm run i18n:auditpnpm run check:repo-hygienepnpm run fmt:rsandgit diff --checkcargo build --no-default-featureswithtauri.dev.conf.jsonand development codegen settings;pnpm run build:webReal read-only verification:
pnpm --dir tests/e2e exec wdio run ./config/wdio.gitee-native.ts: all 3 native Windows desktop scenarios passed on 2026-09-07, againstdromara/sa-token, using an isolated profile andGITEE_TOKENfrom the process environment. WebdriverIO controlled the actual desktop WebView through the embedded WebDriver, and the runner compared the UI with independent Gitee API reads.result.json, and the runner log were retained locally; the before-selection and selected-detail screenshots were inspected.cargo test --locked -p openbitfun-services-integrations --no-default-features --features review-platform --lib public_gitee_initial_list_statistics -- --ignored: passed for all five states, comparing initial list counts with independent file responses without requesting PR details.cargo test --locked -p openbitfun-services-integrations --no-default-features --features review-platform --lib public_gitee_readonly_smoke -- --ignored: passed againstopeneuler/go-gitee#69, covering complete detail, commits/comments, review target, exact file diff, and the CI section.Write requests, approval partial failures, provider pagination, stale revisions, credential isolation, and old-payload compatibility are covered by local tests. No real Gitee write operation was performed.
Reviewer Notes
Checklist