Skip to content

Update gitea.ts#4067

Open
impcyber wants to merge 1 commit intoDokploy:canaryfrom
impcyber:patch-1
Open

Update gitea.ts#4067
impcyber wants to merge 1 commit intoDokploy:canaryfrom
impcyber:patch-1

Conversation

@impcyber
Copy link

@impcyber impcyber commented Mar 24, 2026

#4066

What is this PR about?

Please describe in a short paragraph what this PR is about.

Checklist

Before submitting this PR, please make sure that:

  • You created a dedicated branch based on the canary branch.
  • You have read the suggestions in the CONTRIBUTING.md file https://github.com/Dokploy/dokploy/blob/canary/CONTRIBUTING.md#pull-request
  • You have tested this PR in your local instance. If you have not tested it yet, please do so before submitting. This helps avoid wasting maintainers' time reviewing code that has not been verified by you.

Issues related (if applicable)

closes #4066

Screenshots (if applicable)

Greptile Summary

This PR fixes an oversight in cloneGiteaRepository where giteaProvider.giteaUrl was used directly instead of preferring giteaProvider.giteaInternalUrl when available. Every other network-call site in the same file (refreshGiteaToken, testGiteaConnection, getGiteaRepositories, getGiteaBranches) already applied the giteaInternalUrl || giteaUrl fallback pattern, so this was the only remaining inconsistency, causing git clones to fail or bypass the internal network path when Gitea is co-hosted with Dokploy.

  • Fix: buildGiteaCloneUrl is now called with giteaProvider.giteaInternalUrl || giteaProvider.giteaUrl, matching the pattern used everywhere else in the file.
  • Correctness: giteaInternalUrl is text | null in the schema, so the || fallback correctly resolves to giteaUrl when it is null or unset. No type or runtime issues.
  • No other changes were made to the file.

Confidence Score: 5/5

  • Safe to merge — minimal, targeted fix with no side-effects.
  • The change is a one-line consistency fix that brings cloneGiteaRepository in line with every other function in the same file. The fallback logic (null || giteaUrl) is idiomatic and correct. No new behaviour is introduced when giteaInternalUrl is unset.
  • No files require special attention.

Reviews (1): Last reviewed commit: "Update gitea.ts" | Re-trigger Greptile

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

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

Labels

pr-open size:XS This PR changes 0-9 lines, ignoring generated files.

1 participant