Skip to content

Fix mirror RemoteAddress not updated when changing mirror address#37083

Open
majorissuerep wants to merge 1 commit intogo-gitea:mainfrom
majorissuerep:fix/mirror-remote-address-empty
Open

Fix mirror RemoteAddress not updated when changing mirror address#37083
majorissuerep wants to merge 1 commit intogo-gitea:mainfrom
majorissuerep:fix/mirror-remote-address-empty

Conversation

@majorissuerep
Copy link
Copy Markdown

Summary

Fixes #28203

UpdateAddress in services/mirror/mirror_pull.go updated repo.OriginalURL but never wrote the sanitized URL to mirror.RemoteAddress. The settings UI reads PullMirror.RemoteAddress directly from the DB, so the mirror URL appeared blank after any address change.

  • Set m.RemoteAddress to the sanitized URL
  • Persist it via UpdateMirror before updating the repository's original_url column

Test plan

  • Create a pull mirror repository
  • Go to Settings → Mirror and change the mirror URL
  • Verify the new URL is shown correctly in the mirror table (was blank before)

Note: This PR was developed with AI assistance (Claude Sonnet 4.6). The fix has been reviewed and manually traced through the call chain.

🤖 Generated with Claude Code

…-gitea#28203)

UpdateAddress updated repo.OriginalURL but never wrote to mirror.RemoteAddress.
The settings UI reads PullMirror.RemoteAddress directly from the DB, so the
URL appeared blank whenever it was changed via the settings form.

Fix: persist the sanitized URL to mirror.RemoteAddress via UpdateMirror before
updating the repository's original_url column.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 2, 2026
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Apr 2, 2026
Copy link
Copy Markdown
Member

@bircni bircni left a comment

Choose a reason for hiding this comment

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

https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md

Please read what claude wrote in the PR for you - there are tasks which are not checked...

@GiteaBot GiteaBot added lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged modifies/go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing mirror URL on project dashboard

3 participants