GeezerVison is showing github.com — fix(forgejo): a fork's same-named branch no longer hides the branch's own pull request by only21mil · Pull Request #33704 · pingdotgg/t3code
Conversation
only21mil
commented
Nov 10, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Problem
On Forgejo and Gitea, T3 Code can lose the pull request for the branch you are on when forks have pull requests from a branch with the same name, such as feature. pulls?head=feature matches that name in every fork, and T3 Code reads it most recently updated first. Forgejo defines no headBranchProbe, so GitManager keeps 1 open row, or 20 of any state, and its owner check then drops the fork rows. So:
- With more than 20 fork pull requests on that name updated after the branch's own, the branch status shows no pull request, and the Version Control panel offers Create PR.
- With one fork pull request updated after the branch's own, a push on Forgejo returns Create PR instead of View PR as its follow-up action: Forgejo records the push on the pull request about a second after replying. The web client does not show this action. By the code, the mobile client shows a link only for View PR.
Change
Forgejo gets the headBranchProbe the GitHub and Azure DevOps providers already have: it drops owner:branch selectors and reads 100 rows. Forgejo sends the bare branch for both selectors, and the caller checks owners. This follows saphid's merged #29817 for Azure DevOps; #29791 (GitLab) and #29751 (Bitbucket) are open.
Cost: below 50 matches the open lookup reads one more, empty page (seen in Forgejo's access log). The any-state lookup is unchanged below 20 matches.
Scope and approval
This is a small fix with no issue: one 5-line provider hook, the same as the GitHub and Azure DevOps hooks, plus one test. No open PR adds a Forgejo probe. #33675 (deleted head branches) and #25569 (Gitea scan cache) edit listChangeRequests next to it, not the probe.
Verification
vp test run src/server/ForgejoSourceControlProvider.test.ts in packages/source-control-forgejo: the new test fails on main (expected [ 9 ] to deeply equal [ 9, 4 ]) and passes here; 65/65 package tests and vp run check:changed pass.
- Loopback Forgejo 17.0.1 and Gitea 28.3.0 with synthetic users,
tea 0.16.0 as maria, a T3 dev server, and the web client clicked in the Browser panel, on main d1909d6 and on this head 7ae6f73. Branch feature of maria/project has open pull request oxc stack #1.
- One fork pull request updated after oxc stack #1, then Push in the Browser panel. Follow-up action as I read it from the server's push reply: Forgejo
main Create PR 3 of 3, this branch View PR oxc stack #1 2 of 2. Gitea main is already right (View PR oxc stack #1, 2 of 2), because Gitea records the push before replying. These are counts from the run; the raw replies were not kept, and no client shows this action, so this bullet has no capture. The status kept oxc stack #1 throughout, so Create PR was never offered.
- 21 fork pull requests updated after oxc stack #1:
- Codeberg (Forgejo 17.0.0), real provider with only the CLI's API call replaced by
fetch: repos/forgejo/forgejo/pulls?state=open&head=forgejo returns 8 pull requests from 8 forks. main keeps 1 open and 20 of any state; this branch keeps 8 and 84.
Not checked: the mobile client, where the push follow-up shows.
Generated with Claude Opus 5.5 in T3 Code Nightly
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at 7ae6f73
Macroscope's review found this PR approvable — Forgejo branch lookup now considers more pull requests so a fork's same-named branch does not hide the intended match. Existing repository and owner matching remains in place; the change affects read-only discovery.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 10, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
The Forgejo provider adds a head-branch probe that filters selectors containing : and sets a limit of 100. A new test checks results when a fork and the base repository have pull requests with the same head branch.
Changes: Forgejo head-branch lookup
| Layer / File(s) |
Summary |
Head-branch probe and coverage packages/source-control-forgejo/src/server/ForgejoSourceControlProvider.ts, packages/source-control-forgejo/src/server/ForgejoSourceControlProvider.test.ts |
The provider adds a probe that filters selectors containing : and sets a limit of 100. The test checks that pull requests from a fork and the base repository are both returned for the same head branch. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
Suggested labels: size:S
Suggested reviewers: juliusmarminge
Merge Risk: Minimal · up to 7ae6f
-
The change addresses the reported branch lookup failure, and no actionable issue is established from the available evidence. It is mergeable after normal checks.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title clearly describes the fix: a fork’s same-named branch no longer hides the pull request for the current branch. |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
| Description check |
 |
The description covers the template sections: Problem, Change, Scope and approval, and Verification. The Problem section explains the Forgejo fork same-name branch bug and its user-visible effects. Th… |
Full details: Description check
-
Explanation
The description covers the template sections: Problem, Change, Scope and approval, and Verification. The Problem section explains the Forgejo fork same-name branch bug and its user-visible effects. The Change section explains the headBranchProbe addition and its request-cost tradeoff. The Scope section explains why no prior issue is linked and why the change is small. The Verification section lists focused test commands, before/after results, a local browser test on Forgejo and Gitea with screenshots, a Codeberg check, and items not checked (mobile client). The model and harness are named at the end, as the template requests.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between e89abad and 7ae6f73.
Files selected for processing: 2
-
packages/source-control-forgejo/src/server/ForgejoSourceControlProvider.test.ts
packages/source-control-forgejo/src/server/ForgejoSourceControlProvider.ts
Limit details: You’ve used all 10 included reviews currently available.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Note 🤖 Opus 5.5 replying on behalf of Victor.
Closing this to bring my open PRs down under the new limit. The branch stays on my fork if it is useful.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:XS
0-9 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|