Skip to content

Unify repo names in system notices#36491

Merged
wxiaoguang merged 13 commits intomainfrom
copilot/fix-issue-36211
Feb 1, 2026
Merged

Unify repo names in system notices#36491
wxiaoguang merged 13 commits intomainfrom
copilot/fix-issue-36211

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 30, 2026

Fixes: #36211

This PR fixes ensures that all system notices consistently include repository names in the format "Action description (owner/repo): error message".

Before:

  • Failed to update mirror repository 'owner/repo.git': error
  • Repository garbage collection failed for owner/repo.git. Stdout: ...
  • Delete repository files [owner/repo]: error
  • Migrate repository from failed: error

After:

  • Failed to update mirror repository (owner/repo): error
  • Repository garbage collection failed (owner/repo). Stdout: ...
  • Delete repository files (owner/repo): error
  • Migrate repository (owner/repo) from https://example.com failed: error

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 30, 2026
Copilot AI and others added 2 commits January 30, 2026 05:34
Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>
Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue with @go-gitea/gitea functionality Standardize repository identification in system notices Jan 30, 2026
Copilot AI requested a review from silverwind January 30, 2026 05:46
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Jan 30, 2026
Check if opts.OriginalURL is empty and adapt the notice message accordingly to avoid printing "from  failed" when OriginalURL is not set (e.g., when using the API).

Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>

Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 30, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • code.onedev.io
    • Triggering command: /tmp/go-build1922630367/b001/migrations.test /tmp/go-build1922630367/b001/migrations.test -test.testlogfile=/tmp/go-build1922630367/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -o pkg/mod/github.c-errorsas pkg/mod/github.c-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet -p github.com/bleve-atomic mpile ux-amd64/pkg/too-buildtags (dns block)
    • Triggering command: /tmp/go-build1789349796/b001/migrations.test /tmp/go-build1789349796/b001/migrations.test -test.testlogfile=/tmp/go-build1789349796/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s (dns block)
  • gitlab.com
    • Triggering command: /tmp/go-build1922630367/b001/migrations.test /tmp/go-build1922630367/b001/migrations.test -test.testlogfile=/tmp/go-build1922630367/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -o pkg/mod/github.c-errorsas pkg/mod/github.c-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet -p github.com/bleve-atomic mpile ux-amd64/pkg/too-buildtags (dns block)
    • Triggering command: /tmp/go-build1789349796/b001/migrations.test /tmp/go-build1789349796/b001/migrations.test -test.testlogfile=/tmp/go-build1789349796/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Added TODO comment before the migration failure notice to document that opts.OriginalURL can be empty when migration is triggered via the API route, which doesn't set this field. The comment also suggests potential solutions.

Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>

Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>
Fixed the API migration endpoint to set opts.OriginalURL from form.CloneAddr, ensuring consistency with the web route and preventing empty URL in system notices. Removed the TODO comment since OriginalURL is now always populated.

Since CloneAddr is a required field (binding:"Required"), OriginalURL will always be non-empty when the API validation passes.

Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>

Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>
@github-actions github-actions bot added the modifies/api This PR adds API routes or modifies them label Jan 30, 2026
@silverwind
Copy link
Copy Markdown
Member

Tested the migration failure, looks good:

image

@silverwind silverwind marked this pull request as ready for review January 31, 2026 08:34
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 31, 2026
@silverwind silverwind changed the title Standardize repository identification in system notices Unify repo names in system notices Feb 1, 2026
@silverwind
Copy link
Copy Markdown
Member

Updated PR description.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 1, 2026
@wxiaoguang wxiaoguang merged commit 072de7d into main Feb 1, 2026
28 checks passed
@GiteaBot GiteaBot added this to the 1.26.0 milestone Feb 1, 2026
@wxiaoguang wxiaoguang deleted the copilot/fix-issue-36211 branch February 1, 2026 09:07
silverwind added a commit to silverwind/gitea that referenced this pull request Feb 1, 2026
* origin/main:
  Fix incorrect vendored detections (go-gitea#36508)
  Bump alpine to 3.23, add platforms to `docker-dryrun` (go-gitea#36379)
  Unify repo names in system notices (go-gitea#36491)
  Allow scroll propagation outside code editor (go-gitea#36502)
  Refactor ActionsTaskID (go-gitea#36503)
  Update JS deps, remove `knip`, misc tweaks (go-gitea#36499)
  [skip ci] Updated translations via Crowdin
  Fix editorconfig not respected in PR Conversation view (go-gitea#36492)
  Add FOLDER_ICON_THEME configuration option (go-gitea#36496)
  Don't create self-references in merged PRs (go-gitea#36490)
  Use reserved .test TLD for unit tests (go-gitea#36498)
  Fix bug when list pull request commits (go-gitea#36485)
  Update some go dependencies (go-gitea#36489)
  chore: add comments for "api/healthz", clean up test env (go-gitea#36481)
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 2, 2026
* giteaofficial/main: (26 commits)
  [skip ci] Updated translations via Crowdin
  Remove and forbid `@ts-expect-error` (go-gitea#36513)
  Add resolve/unresolve review comment API endpoints (go-gitea#36441)
  Fix incorrect vendored detections (go-gitea#36508)
  Bump alpine to 3.23, add platforms to `docker-dryrun` (go-gitea#36379)
  Unify repo names in system notices (go-gitea#36491)
  Allow scroll propagation outside code editor (go-gitea#36502)
  Refactor ActionsTaskID (go-gitea#36503)
  Update JS deps, remove `knip`, misc tweaks (go-gitea#36499)
  [skip ci] Updated translations via Crowdin
  Fix editorconfig not respected in PR Conversation view (go-gitea#36492)
  Add FOLDER_ICON_THEME configuration option (go-gitea#36496)
  Don't create self-references in merged PRs (go-gitea#36490)
  Use reserved .test TLD for unit tests (go-gitea#36498)
  Fix bug when list pull request commits (go-gitea#36485)
  Update some go dependencies (go-gitea#36489)
  chore: add comments for "api/healthz", clean up test env (go-gitea#36481)
  [SECURITY] Toolchain Update to Go 1.25.6 (go-gitea#36480)
  [skip ci] Updated translations via Crowdin
  Render merged pull request title as such in dashboard feed (go-gitea#36479)
  ...
silverwind added a commit to silverwind/gitea that referenced this pull request Feb 4, 2026
* origin/main: (1246 commits)
  fix(packages/container): data race when uploading container blobs concurrently (go-gitea#36524)
  [skip ci] Updated translations via Crowdin
  Remove and forbid `@ts-expect-error` (go-gitea#36513)
  Add resolve/unresolve review comment API endpoints (go-gitea#36441)
  Fix incorrect vendored detections (go-gitea#36508)
  Bump alpine to 3.23, add platforms to `docker-dryrun` (go-gitea#36379)
  Unify repo names in system notices (go-gitea#36491)
  Allow scroll propagation outside code editor (go-gitea#36502)
  Refactor ActionsTaskID (go-gitea#36503)
  Update JS deps, remove `knip`, misc tweaks (go-gitea#36499)
  [skip ci] Updated translations via Crowdin
  Fix editorconfig not respected in PR Conversation view (go-gitea#36492)
  Add FOLDER_ICON_THEME configuration option (go-gitea#36496)
  Don't create self-references in merged PRs (go-gitea#36490)
  Use reserved .test TLD for unit tests (go-gitea#36498)
  Fix bug when list pull request commits (go-gitea#36485)
  Update some go dependencies (go-gitea#36489)
  chore: add comments for "api/healthz", clean up test env (go-gitea#36481)
  [SECURITY] Toolchain Update to Go 1.25.6 (go-gitea#36480)
  [skip ci] Updated translations via Crowdin
  ...

# Conflicts:
#	modules/templates/helper.go
#	options/locale/locale_en-US.ini
#	routers/web/repo/cherry_pick.go
#	routers/web/repo/editor.go
#	routers/web/repo/patch.go
#	templates/repo/editor/edit.tmpl
#	web_src/js/features/codeeditor.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing repo name in system message

4 participants