Skip to content

Feat/forgejo UI env protocol#1

Merged
neubig merged 11 commits intojohba37:forgejo-integration-rebasedfrom
MrGeorgen:feat/forgejo-ui-env-protocol
Dec 27, 2025
Merged

Feat/forgejo UI env protocol#1
neubig merged 11 commits intojohba37:forgejo-integration-rebasedfrom
MrGeorgen:feat/forgejo-ui-env-protocol

Conversation

@MrGeorgen
Copy link
Copy Markdown

@MrGeorgen MrGeorgen commented Dec 23, 2025

Summarize what the PR does, explaining any non-trivial design decisions.

  • I re-implemented the changes from Forgejo integration OpenHands/OpenHands#11111 (comment), becasue these commits were never published
  • trim whitespaces from alll git providers and tokens, because forgejo lets you manually select and copy the token and does not have a copy to clipboard button. So someone can easily also copy whitespaces additional to the token. When this happened, it caused the forgejo integration to partly work before. You can start a forgejo conversation, but the clone of the git repo fails. By triming whitespaces this bug is fixed.
    I also implemented the triming for the other providers because the same problem can probably also occur there.
  • fix to allow all self hosted forgejo instances b8dfa03
  • currently you always have to explicitly put codeberg.org into the UI settings page, the default fallback to codeberg.org doesnot work

openhands-agent and others added 11 commits December 15, 2025 20:36
…- Frontend: add Forgejo token + host inputs with i18n; integrate into Git Settings\n- Types: include 'forgejo' in ProviderOptions\n- Backend: auto-read FORGEJO_TOKEN and FORGEJO_BASE_URL; host extraction\n- Provider: normalize domain to avoid double protocol/path; treat Forgejo like GitHub auth URLs\n- Resolver: recognize FORGEJO_TOKEN for CLI paths\n\nNote: Frontend lint/build skipped here due to missing Node; please run npm lint/build in CI\n\nCo-authored-by: openhands <openhands@all-hands.dev>
…es forgejo)\n\n- Use Provider from types/settings for conversation subscription APIs\n- Cast providers in use-create-conversation-and-subscribe-multiple to Provider[]\n\nCo-authored-by: openhands <openhands@all-hands.dev>
…: add selected_provider to /api/user/repository/branches and thread through ProviderHandler.get_branches\n- Frontend: pass selected_provider for branch pagination and search; plumb provider to hooks\n- Frontend utils: add Forgejo base URL and URL builders (PR, branch, microagent) + provider name\n- Normalize protocol/host via existing backend logic to avoid double-protocol in git URLs\n\nCo-authored-by: openhands <openhands@all-hands.dev>
…ost is unset\n\nEnsures public clone works with FORGEJO_BASE_URL env or service base without forcing host to be saved in secrets.\n\nCo-authored-by: openhands <openhands@all-hands.dev>
… token host is unset\n\nEnsures public clone works with FORGEJO_BASE_URL env or service base without forcing host to be saved in secrets.\n\nCo-authored-by: openhands <openhands@all-hands.dev>"

This reverts commit 468dc3d.
…provided\n\nThis ensures custom Forgejo hosts are correctly recognized without requiring the domain to contain 'forgejo' or 'codeberg'.\n\nCo-authored-by: openhands <openhands@all-hands.dev>
…inks

fix(forgejo): prevent GitHub fallback, add selected_provider to branches API, and correct Forgejo link utils
…nd host on save\n\nAvoids subtle validation failures due to accidental spaces in inputs.\n\nCo-authored-by: openhands <openhands@all-hands.dev>
…ab, bitbucket, azure devops, forgejo) on save\n\nPrevents validation issues from pasted tokens with leading/trailing spaces.\n\nCo-authored-by: openhands <openhands@all-hands.dev>
@neubig neubig merged commit 331c6d9 into johba37:forgejo-integration-rebased Dec 27, 2025
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.

3 participants