Skip to content

feat(pull-requests): support native Gitea team reviewers - #21

Open
kalvenschraut wants to merge 2 commits into
gitea/review-paginationfrom
gitea/team-reviewers
Open

feat(pull-requests): support native Gitea team reviewers#21
kalvenschraut wants to merge 2 commits into
gitea/review-paginationfrom
gitea/team-reviewers

Conversation

@kalvenschraut

@kalvenschraut kalvenschraut commented Sep 5, 2026

Copy link
Copy Markdown
Member

Gitea reviewer selection now includes repository teams and sends native team-name review requests. The reviewing list includes PRs requested from the viewer’s teams, using paginated membership reads cached for one minute. Personal repositories continue listing user reviewers.

Keeps team membership inside the Gitea adapter and preserves shared user-reviewer models. Focused cases cover requested teams, native request payloads, personal repositories, and membership pagination; included in 228 passing focused T3 tests. The final integrated server typecheck and targeted lint pass with the stack follow-up #22.

Final stack validation at 256fd6fe5: 228 focused tests passed, followed by 61 API/workflow cases and the final team-recovery regression; server typecheck and targeted lint passed. The live settle-on-merge E2E previously passed with fixture cleanup. Companion Gitea backend and focused integration tests passed, including native revert across all five merge styles.

Model: GPT-5.6 Terra and GPT-6 Astra. Harness: Codex; reviewed with Fable 5.1.

Summary by CodeRabbit

  • New Features

    • Added support for team-based pull request reviewers and review requests.
    • Team review requests now appear in “reviewing” filters and reviewer candidate lists.
    • Pull request details include requested team names and IDs.
    • Team membership data is loaded efficiently and supports paginated results.
  • Bug Fixes

    • Improved compatibility with Gitea instances where team endpoints are unavailable.
    • Updated pagination and reviewer handling for more reliable results.

@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 40ffc930-6ab6-4fec-a537-d40b803ace2d

📥 Commits

Reviewing files that changed from the base of the PR and between a09a525 and bf2bdc7.

📒 Files selected for processing (3)
  • apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
  • apps/server/src/pullRequest/GiteaPullRequestApi.ts
  • apps/server/src/pullRequest/GiteaPullRequestProvider.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Gitea team reviewer support

Layer / File(s) Summary
Team reviewer contract and matching
apps/server/src/pullRequest/GiteaPullRequestApi.ts, apps/server/src/pullRequest/GiteaPullRequestProvider.test.ts
The API decodes team reviewers and exposes their IDs and names. Reviewing matches include requested teams. Fixtures include the new fields.
Viewer team retrieval and filtering
apps/server/src/pullRequest/GiteaPullRequestApi.ts, apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
Cached, paginated viewer-team retrieval supports search-backed and native reviewing listings. Tests cover pagination and team-based matches.
Reviewer candidate loading and fallback
apps/server/src/pullRequest/GiteaPullRequestApi.ts, apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
Reviewer candidates include teams and users. HTTP 405 team endpoints return user candidates without failure. Tests cover requested team selection and fallback behavior.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: 🟡 Moderate · up to bf2bd

This adds native Gitea team reviewer support, but unresolved server schema-inference/typecheck corrections remain in the current change. Merge after those corrections are included or explicitly accepted.

Sequence Diagram(s)

sequenceDiagram
  participant Viewer
  participant GiteaPullRequestApi
  participant GiteaTeamsEndpoint
  participant GiteaPullRequestsEndpoint
  Viewer->>GiteaPullRequestApi: Request reviewing pull requests
  GiteaPullRequestApi->>GiteaTeamsEndpoint: Fetch paginated viewer teams
  GiteaTeamsEndpoint-->>GiteaPullRequestApi: Return viewer team IDs
  GiteaPullRequestApi->>GiteaPullRequestsEndpoint: Fetch pull requests
  GiteaPullRequestsEndpoint-->>GiteaPullRequestApi: Return requested team reviewers
  GiteaPullRequestApi-->>Viewer: Return matching reviewing pull requests
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the primary change: native Gitea team reviewer support.
Description check ✅ Passed The description clearly explains the change, rationale, implementation scope, tests, and validation results. It does not use the template headings or include the checklist, but the required informatio…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch gitea/team-reviewers

Comment @coderabbitai help to get the list of available commands.

@kalvenschraut
kalvenschraut marked this pull request as ready for review September 5, 2026 05:57
@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai approve

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
✅ Action performed

Comments resolved. Approval is disabled; enable reviews.request_changes_workflow to allow explicit top-level @coderabbitai resolve or @coderabbitai approve commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant