Skip to content

[Bug]: Gitea WIP PRs are incorrectly shown as having merge conflicts #15145

Description

@batalyse-gmbh

Before submitting

  • I searched existing issues and did not find an exact duplicate.
  • I included enough detail to investigate the problem.

Area

apps/server (Forgejo/Gitea status mapping, surfaced in the PR UI)

Steps to reproduce

  1. Connect a Gitea repository through T3 Code's source-control integration.
  2. Open a PR whose branch has no merge conflicts, with a title prefixed by WIP: (Gitea's work-in-progress/draft convention).
  3. Confirm on Gitea that merging is blocked because the PR is work in progress.
  4. View the PR status in T3 Code.

These steps describe the reported behavior. The investigation below verified the source-code mechanism; it did not perform a fresh live reproduction.

Expected behavior

T3 Code shows the PR as draft/work in progress without claiming that it has merge conflicts. A PR blocked for another reason, or still being checked, should likewise not be labeled conflicting unless there is evidence of an actual conflict.

Actual behavior

T3 Code reports a merge conflict even though the PR is blocked by its WIP: status.

Impact

Minor bug or occasional failure: misleading status suggests unnecessary conflict resolution and obscures the actual merge blocker.

Source-code evidence

At upstream T3 Code commit 31a9da179ed0763335f05681c577474aec5d2309, forgejoChangeRequest recognizes draft status separately but translates every mergeable: false into "conflicting":

isDraft: pr.draft ?? /^(?:\[WIP\]|WIP:)/i.test(pr.title),
mergeability:
  pr.mergeable === undefined ? "unknown" : pr.mergeable ? "mergeable" : "conflicting",

Gitea's PullRequest.Mergeable returns false for work-in-progress PRs, conflict checks still running, and conflict-check errors, as well as actual conflicts. Its API converter exposes that result as mergeable.

This establishes that the API boolean is insufficient evidence of a conflict. Simply suppressing conflicts on every draft would also hide genuine conflicts in draft PRs; the mapping needs to preserve that distinction.

Version or commit

Source inspection: upstream main at 31a9da179ed0763335f05681c577474aec5d2309 (2026-10-03).
Locally installed CLI reports t3 v0.0.44; the running app build was not independently confirmed.

Environment

Gitea source-control integration. Gitea server version and browser/desktop build were not collected.

Related reports

Workaround

Open the PR on Gitea to inspect the actual merge blocker.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions