Repository navigation
feat(pull-requests): support native Gitea team reviewers - #21
Conversation
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughChangesGitea team reviewer support
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🟡 Moderate · up to 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
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai approve |
✅ Action performedComments resolved. Approval is disabled; enable |
|
Merge verdict: NO-GO (review gates incomplete). Head:
No merge performed. Resume the independent code reviews when Fable is available, obtain the missing/current CodeRabbit approval where applicable, and recheck the exact head and base before merging. |
|
@coderabbitai approve The maintainer requests formal approval for the remaining PRs. Please assess the exact current head If branch configuration prevents formal approval, please state that explicitly. Independent Codex/Fable code verdicts are being refreshed separately; this request does not authorize merging or bypassing their findings. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== HEAD =='
git rev-parse HEAD
printf '%s\n' '== STATUS =='
git status --short
printf '%s\n' '== DIFF STAT AGAINST BASE =='
git diff --stat gitea/review-pagination...HEAD
printf '%s\n' '== DIFF =='
git diff --find-renames --find-copies --unified=80 gitea/review-pagination...HEAD -- \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts \
apps/server/src/pullRequest/GiteaPullRequestProvider.test.ts
printf '%s\n' '== SOURCE OUTLINE =='
ast-grep outline apps/server/src/pullRequest/GiteaPullRequestApi.ts --items all
printf '%s\n' '== TEST OUTLINE =='
ast-grep outline apps/server/src/pullRequest/GiteaPullRequestApi.test.ts --items allLength of output: 1361 ⚙️ CodeRabbit configuration inspected Length of output: 5505 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== REFS =='
git branch -a
printf '%s\n' '== PARENTS =='
git show --no-patch --format='commit=%H%nparents=%P%nsubject=%s' HEAD
printf '%s\n' '== CHANGED FILES IN HEAD COMMIT =='
git diff-tree --no-commit-id --name-status -r HEAD
printf '%s\n' '== COMMIT DIFF =='
git show --format=fuller --find-renames --find-copies --unified=100 HEAD -- \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts \
apps/server/src/pullRequest/GiteaPullRequestProvider.test.ts
printf '%s\n' '== SOURCE OUTLINE =='
ast-grep outline apps/server/src/pullRequest/GiteaPullRequestApi.ts --items all
printf '%s\n' '== TEST OUTLINE =='
ast-grep outline apps/server/src/pullRequest/GiteaPullRequestApi.test.ts --items allLength of output: 21586 🏁 Script executed: #!/bin/bash
set -euo pipefail
base="$(git merge-base origin/main HEAD)"
printf 'merge_base=%s\n' "$base"
printf '%s\n' '== COMMITS SINCE MERGE BASE =='
git log --reverse --format='%H %s' "${base}..HEAD"
printf '%s\n' '== COMPLETE PR DIFF =='
git diff --find-renames --find-copies --unified=60 "${base}...HEAD" -- \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts \
apps/server/src/pullRequest/GiteaPullRequestProvider.test.ts
printf '%s\n' '== SOURCE: PARSING AND PAGINATION HELPERS =='
sed -n '58,490p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
printf '%s\n' '== SOURCE: API IMPLEMENTATION =='
sed -n '666,1260p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
printf '%s\n' '== SOURCE: REVIEWER OPERATIONS =='
sed -n '1960,2070p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
printf '%s\n' '== FOCUSED TESTS =='
sed -n '1,520p' apps/server/src/pullRequest/GiteaPullRequestApi.test.tsLength of output: 214707 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== TEAM REVIEWER COMMIT =='
git show --format=fuller --find-renames --find-copies --unified=45 de4d24c535f7bd6a73ae358b099c5ce3419fda91 -- \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts \
apps/server/src/pullRequest/GiteaPullRequestProvider.test.ts
printf '%s\n' '== ERROR-DECODING FIX COMMIT =='
git show --format=fuller --unified=30 bf2bdc7622c2f328af84409e8d4ca6df2e8c1750 -- \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
printf '%s\n' '== TEAM-REVIEWER TEST LOCATIONS =='
rg -n -C 8 'requested_reviewers_teams|team_reviewers|user/teams|listTeamReviewerCandidates|viewer team' \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.tsLength of output: 71518 🤖 web_search executed:
Length of output: 16048
I reviewed
Use the paginated reader for repository teams. Include Gitea documents paginated team lists and accepts team names in The repository configuration sets You are interacting with an AI system. |
|
Merge verdict: NO-GO. This supersedes the earlier quota-only readiness comment. Reviewed head:
@coderabbitai Please withdraw the repository-team pagination finding using the linked native handler; retain the separate public-only-token failure finding until fixed. Validation: 339 focused integrated PR tests plus 502 cross-provider tests passed at integration head No merge is authorized while any blocker or required approval is outstanding. Recheck the resulting head and current base after corrections or stack merges. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🤖 web_search executed:
Length of output: 10604
Gitea v1.27.3 The separate ✏️ Learnings added
You are interacting with an AI system. |
|
NO-GO — scoped tokens can lose the Reviewing list Reviewed commit: Codex and Claude Fable 5.1 both block this change. Handle unavailable team membership without discarding direct review assignments; represent partial coverage where appropriate. Add a focused test for a denied team lookup with readable directly assigned PRs, then re-review. Validation by Codex: the exact #36 integration head Reviewers: Codex and Claude Fable 5.1 (Claude CLI). |
|
@coderabbitai review Please independently review the newly pushed fixes at |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
requested='146d2c6b6b8c2bb525628f6df879ee07fee686ed'
printf '%s\n' '== HEAD AND REQUESTED COMMIT =='
git rev-parse HEAD
git show --no-patch --format='commit=%H%nparents=%P%nsubject=%s' "$requested"
printf '%s\n' '== STATUS =='
git status --short
printf '%s\n' '== DIFF FOR REQUESTED COMMIT =='
git show --find-renames --find-copies --unified=80 --format=fuller "$requested" -- \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts \
apps/server/src/pullRequest/GiteaPullRequestProvider.test.ts
printf '%s\n' '== CHANGED FILES SINCE PR BASE =='
base="$(git merge-base origin/gitea/review-pagination "$requested")"
printf 'base=%s\n' "$base"
git diff --name-status "$base...$requested"
printf '%s\n' '== SOURCE OUTLINE =='
ast-grep outline apps/server/src/pullRequest/GiteaPullRequestApi.ts --items all
printf '%s\n' '== VIEWER TEAM CALL SITES AND ERROR HANDLING =='
rg -n -C 12 --glob 'GiteaPullRequestApi.ts' \
'getViewerTeamIDs|user/teams|reviewRequestTeamIDs|reviewRequestTeamNames|Promise\.allSettled|catch\s*\(' \
apps/server/src/pullRequest
printf '%s\n' '== RELEVANT IMPLEMENTATION =='
sed -n '360,520p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
sed -n '880,1220p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
sed -n '1940,2090p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
printf '%s\n' '== TEST OUTLINE =='
ast-grep outline apps/server/src/pullRequest/GiteaPullRequestApi.test.ts --items all
printf '%s\n' '== RELEVANT TESTS =='
rg -n -C 18 --glob 'GiteaPullRequestApi.test.ts' \
'user/teams|viewer team|reviewing|requested_reviewers_teams|team_reviewers|405|denied|forbidden|partial' \
apps/server/src/pullRequest
printf '%s\n' '== CODERABBIT CONFIGURATION FILES =='
fd -HI 'coderabbit\.ya?ml|\.coderabbit\.ya?ml' . -x sh -c 'echo "== $1 =="; cat "$1"' sh {} \;Length of output: 7535 🏁 Script executed: #!/bin/bash
set -euo pipefail
requested='146d2c6b6b8c2bb525628f6df879ee07fee686ed'
parent_one='ca97a942a068039ad27cd7ecb080deed93dc958c'
parent_two='ef4238824778653c9dba037c4fc7032232ca8e54'
printf '%s\n' '== MERGE DIFF VS FIRST PARENT =='
git diff --find-renames --find-copies --unified=80 "$parent_one" "$requested" -- \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts \
apps/server/src/pullRequest/GiteaPullRequestProvider.test.ts
printf '%s\n' '== MERGE DIFF VS SECOND PARENT =='
git diff --find-renames --find-copies --unified=80 "$parent_two" "$requested" -- \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts \
apps/server/src/pullRequest/GiteaPullRequestProvider.test.ts
printf '%s\n' '== ALL COMMITS REACHABLE FROM HEAD NOT FIRST PARENT =='
git log --reverse --format='%H %s' "$parent_one..$requested"
printf '%s\n' '== SOURCE OUTLINE =='
ast-grep outline apps/server/src/pullRequest/GiteaPullRequestApi.ts --items all
printf '%s\n' '== VIEWER-TEAM IMPLEMENTATION AND CALL SITES =='
rg -n -C 16 --glob 'GiteaPullRequestApi.ts' \
'getViewerTeamIDs|user/teams|reviewRequestTeamIDs|reviewRequestTeamNames|reviewing|catchAll|catch\s*\(' \
apps/server/src/pullRequest
printf '%s\n' '== REVIEWER CANDIDATE IMPLEMENTATION =='
sed -n '1930,2105p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
printf '%s\n' '== FOCUSED TEST LOCATIONS =='
rg -n -C 22 --glob 'GiteaPullRequestApi.test.ts' \
'user/teams|viewer team|reviewing|requested_reviewers_teams|team_reviewers|denied|forbidden|partial|GiteaApiError' \
apps/server/src/pullRequest
printf '%s\n' '== ACTIVE CODERABBIT CONFIGURATION =='
fd -HI -t f -g 'coderabbit.yaml' -g 'coderabbit.yml' -g '.coderabbit.yaml' -g '.coderabbit.yml' . \
-x sh -c 'echo "== $1 =="; cat "$1"' sh {}
printf '%s\n' '== GITHUB PR STATE =='
gh pr view 21 --repo RTVision/t3code --json number,headRefName,headRefOid,baseRefName,state,isDraft,reviewDecision,reviews,comments \
--jq '{number, headRefName, headRefOid, baseRefName, state, isDraft, reviewDecision, reviews: [.reviews[] | {author: .author.login, state, commit: .commit.oid}], comments: [.comments[] | {author: .author.login, body}]}'Length of output: 180358 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== CODERABBIT CONFIGURATION =='
if [ -f .coderabbit.yaml ]; then
cat .coderabbit.yaml
elif [ -f .coderabbit.yml ]; then
cat .coderabbit.yml
else
echo 'No root CodeRabbit configuration file found.'
fi
printf '%s\n' '== PULL REQUEST LIST PAGE CONTRACT =='
rg -n -C 12 --glob '*.ts' \
'truncated:\s*(boolean|true|false)|readonly truncated|interface .*Page|type .*Page' \
apps packages
printf '%s\n' '== TRUNCATION CONSUMERS =='
rg -n -C 10 --glob '*.ts' \
'\.truncated\b|truncated\b' \
apps/server/src apps/web/src apps/desktop/src packages
printf '%s\n' '== LIST PULL REQUEST SERVICE SIGNATURE =='
sed -n '490,680p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
printf '%s\n' '== FULL TEAM-LOOKUP FALLBACK AND LIST RETURNS =='
sed -n '1000,1048p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
sed -n '940,992p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
sed -n '1210,1275p' apps/server/src/pullRequest/GiteaPullRequestApi.tsLength of output: 201517
The direct-review regression is fixed. The new test verifies that a denied One blocker remains:
Keep direct-review matches. Also preserve partial coverage. Return team-membership availability with the cached result, and set 🧠 Learnings usedYou are interacting with an AI system. |
|
Re-review: NO-GO — team lookup failure loses coverage information Reviewed head: Denied team lookup now preserves directly assigned Reviewing items, which repairs the original all-or-nothing failure. The fallback also converts every failure to an empty team set without retaining availability information; team-assigned items disappear while the list may report complete coverage. CodeRabbit withholds approval, and Codex verified the loss of availability information. Fable 5.1: GO; accepts the direct-review fallback and warns that truncated is a pagination flag. Codex and CodeRabbit still require honest team-coverage information. Keep the direct matches and represent unavailable team membership honestly in both native and search-backed Reviewing results. Distinguish partial coverage from a usable next-page cursor; simply forcing a continuation flag can create another pagination problem. Cover denied and failed team reads. Validation by Codex: 308 focused tests across 9 files passed on integration head The remaining native-stack merges must clear their predecessors and the actual target branch. CodeRabbit’s commit-specific comments are distinguished from formal GitHub review records; rate-limited requests are not approvals. |
# Conflicts: # apps/server/src/pullRequest/GiteaPullRequestApi.ts # apps/server/src/pullRequest/GiteaPullRequestProvider.test.ts
|
GO — merged after Codex, Fable 5.1, and CodeRabbit review. Reviewed head: Team lookup failures retain direct review requests and expose partial-coverage warnings through API, provider, service, web listing, continuation pages, and cached snapshots. Partial coverage does not fabricate a pagination cursor or disable the project filter. CodeRabbit reviewed every exact head and cleared the combined integration. Its commit-specific approval is recorded in that comment; this is not a claim of a new formal GitHub APPROVED review on each PR. All three reviewers require #26 to land with #27 or later; they merged together in the dependency batch. Validation by Codex: 490 focused tests across 13 files passed on integration head Merged: |
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
Bug Fixes