Skip to content

feat(source-control): add Forgejo provider support - #1

Merged
Fryuni merged 9 commits into
mainfrom
t3code/forgejo-source-control-provider
Sep 11, 2026
Merged

Fryuni merged 9 commits into
mainfrom
t3code/forgejo-source-control-provider

Conversation

@Fryuni

@Fryuni Fryuni commented Sep 11, 2026

Copy link
Copy Markdown
Owner

What Changed

Adds Forgejo as a source control provider, alongside GitHub, GitLab, Bitbucket, and Azure DevOps.

  • Server: new ForgejoCli (REST reads using fj-saved credentials, with OAuth refresh delegated to fj) and ForgejoSourceControlProvider, wired into provider discovery and the registry.
  • Identity resolution: unknown git remotes are refined through a logged-in fj install, so self-hosted instances — including separate SSH hostnames and non-standard web ports — resolve to one canonical repository key. /pulls/ pull request URLs now map back to the right repository.
  • Contracts/shared: forgejo provider kind and remote URL detection.
  • Web & mobile: Forgejo icon and provider entries in the add-project flow, settings, command palette, pull request references, and status indicators.
  • Docs: source-control guide covers Forgejo setup.

Why

Forgejo instances like Codeberg were only seen as plain git remotes, so pull request and repository integrations silently didn't work there. This follows the existing per-provider adapter pattern: all Forgejo specifics stay in the adapter, orchestration and UI stay generic, and nothing changes for users who don't have fj installed.

UI Changes

New Forgejo icon and provider entries appear wherever providers are listed (settings, add-project flow, command palette, status indicators on web and mobile). No existing provider UI changes. Screenshots to be attached.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Model: GLM (glm-5.3-flash). Harness: opencode in T3 Code.

- Detect authenticated Forgejo instances via the fj CLI and refine unknown remotes, mapping separate SSH hostnames to the web instance (port retained in canonical keys)
- Add Forgejo across the provider registry, GitManager/identity resolution, PR references, and pull request repository keys
- Add Forgejo icons, add-project flows, settings, and command palette entries on web and mobile
- Document Forgejo setup in the source control guide

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5d9a665a5b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/git/GitManager.ts
Comment thread apps/web/src/pullRequestReference.ts
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-11T19:35:21.212692Z 1a20d5c Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Fryuni

Fryuni commented Sep 11, 2026

Copy link
Copy Markdown
Owner Author

@codex review

[from Codex]: Please review the updated head, 7b0b83c. Both prior findings are addressed. Validation: 98 focused tests passed, server typechecking passed, and targeted lint passed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7b0b83c00f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/shared/src/changeRequestUrl.ts Outdated
@Fryuni

Fryuni commented Sep 11, 2026

Copy link
Copy Markdown
Owner Author

@codex review

[from Codex]: Please review updated head c63675b. The HTTP-origin finding is fixed; 63 focused tests, server/web typechecks, and targeted lint passed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c63675b282

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/shared/src/changeRequestUrl.ts Outdated
@Fryuni

Fryuni commented Sep 11, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Linked Forgejo summary synchronization is fixed in b259790. Please review the latest commit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b259790f56

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/sourceControl/forgejoAuth.ts Outdated
@Fryuni

Fryuni commented Sep 11, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Please review latest commit 066d6ba. The prior HTTP/SSH finding was checked against fj 0.6.0 source: fj does not persist the web scheme and also defaults SSH remotes to HTTPS. The thread includes source references; the limitation and explicit HTTP remote workaround are now documented.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 066d6ba0be

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/sourceControl/ForgejoSourceControlProvider.ts
@Fryuni

Fryuni commented Sep 11, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Please review latest commit 6ed94ae. It fixes instance paths in fj authentication, REST credential lookup, and SSH/HTTPS repository grouping. The prior fork-head recommendation was checked against Forgejo source: list head filters compare literal branch names and include fork repositories; the thread includes source evidence and the existing regression test.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6ed94ae1b1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/project/RepositoryIdentityResolver.ts Outdated
@Fryuni

Fryuni commented Sep 11, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Please review latest commit 92f8506. Forgejo instance path case is now preserved through repository identity, shared PR/link keys, status sync and caches, persistence, and client matching. Regression tests cover /Forge and /forge in the same workspace.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 92f85066b7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/sourceControl/ForgejoSourceControlProvider.ts Outdated
@Fryuni

Fryuni commented Sep 11, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Please review latest commit 3505ea0. git:// remotes now resolve against the authenticated Forgejo web instance instead of being parsed as host/path shorthand.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3505ea0a0a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/sourceControl/ForgejoSourceControlProvider.ts
@Fryuni

Fryuni commented Sep 11, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Please review latest commit 1a20d5c. Forgejo URL inputs now normalize whitespace and scheme case before both host refinement and repository/PR parsing.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 1a20d5c918

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Fryuni
Fryuni merged commit 5853848 into main Sep 11, 2026
@Fryuni
Fryuni deleted the t3code/forgejo-source-control-provider branch September 13, 2026 14:43
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