Incorrect dashboard link to a tag of a mirror repository #7169

Closed
opened 2025-11-02 07:18:12 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf on GitHub (Apr 13, 2021).

  • Gitea version (or commit ref): Gitea Version: 1.15.0+dev-126-g66f0fd095
  • Git version: git version 2.31.1.394.g7d1e84936f
  • Operating system: Arch Linux
  • Built from: sources
  • Ran with: systemd
  • Database:
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • tbh haven't tried but I'm pretty sure this applies there, too

Description

I've got mirrors of some GH repos on my Gitea instance and syncing and everything has been working brilliantly.

Links to newly synced tag references are shown "as synced", that is:
wanderer synced new reference refs/tags/2021-04-13 to wanderer/exploitdb from mirror
with "wanderer" being my user and "exploitdb" being the name of the repo I'm mirroring.

This would be all be just right, however, what's problematic is that the link underneath refs/tags/... points to
{GIT-DOT-DOMAIN-DOT-TLD}/wanderer/exploitdb/src/refs/tags/2021-04-13.
As you can see, this is not the structure Gitea uses for displaying tags, the correct one would be
{GIT-DOT-DOMAIN-DOT-TLD}/wanderer/exploitdb/src/tag/2021-04-13,
which, when manually overwritten in the address bar (or clicked through the webui), correctly shows the tag tree.

A similar issue exists with displaying/linking to Gitlab's merge request refs, but I am not quite sure what would need to be done there.
In this case Gitea syncs the refs and shows:
mirror synced new reference refs/merge-requests/355/head to {repo} and
mirror synced new reference refs/merge-requests/355/merge to {repo} (with {repo} being just a placeholder here),
which obviously Gitea doesn't know what to do with.
Here it'd probably suffice to extract the commit hash from the head and create a link using that...

Originally created by @wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf on GitHub (Apr 13, 2021). - Gitea version (or commit ref): ` Gitea Version: 1.15.0+dev-126-g66f0fd095` - Git version: `git version 2.31.1.394.g7d1e84936f` - Operating system: Arch Linux - Built from: `sources` - Ran with: `systemd` - Database: - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] tbh haven't tried but I'm pretty sure this applies there, too ## Description I've got mirrors of some GH repos on my Gitea instance and syncing and everything has been working brilliantly. Links to newly synced tag references are shown "as synced", that is: `wanderer synced new reference refs/tags/2021-04-13 to wanderer/exploitdb from mirror` with "wanderer" being my user and "exploitdb" being the name of the repo I'm mirroring. This would be all be just right, however, what's problematic is that the link underneath `refs/tags/...` points to `{GIT-DOT-DOMAIN-DOT-TLD}/wanderer/exploitdb/src/refs/tags/2021-04-13`. As you can see, this is not the structure Gitea uses for displaying tags, the correct one would be `{GIT-DOT-DOMAIN-DOT-TLD}/wanderer/exploitdb/src/tag/2021-04-13`, which, when manually overwritten in the address bar (or clicked through the webui), correctly shows the tag tree. A similar issue exists with displaying/linking to Gitlab's merge request refs, but I am not quite sure what would need to be done there. In this case Gitea syncs the refs and shows: `mirror synced new reference refs/merge-requests/355/head to {repo}` and `mirror synced new reference refs/merge-requests/355/merge to {repo}` (with `{repo}` being just a placeholder here), which obviously Gitea doesn't know what to do with. Here it'd probably suffice to extract the commit hash from the head and create a link using *that*...
GiteaMirror added the type/bug label 2025-11-02 07:18:12 -06:00
Author
Owner

@lunny commented on GitHub (Mar 2, 2024):

I think this has been resolved.

@lunny commented on GitHub (Mar 2, 2024): I think this has been resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7169