Mirror repositories use their last sync time instead of latest commit time for profile page repository ordering #1397

Closed
opened 2025-11-02 03:59:31 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @smkent on GitHub (Dec 21, 2017).

Description

Every time a mirror repository syncs with its upstream repository (every 8 hours by default), the Gitea mirror repository's last updated time is set to the current time even if there are no upstream changes. This continually causes mirror repositories to be listed higher than other repositories in the Gitea user profile page that contains mirror repositories.

Gitea should instead use the most recent commit time in a mirror repository when determining profile page repository ordering.

This can be reproduced with the following steps:

  1. Create a mirror repository and wait for it to finish syncing.
  2. Create a new source repository and push some content to it.
  3. View the user profile for the two created repositories, and note that the source repository is listed first.
  4. Open the mirror repository, click Settings, and under Mirror Settings click "Sync Now"
  5. Return to the user profile page, and note that the mirror repository is now listed first (with a more recent updated time) even if no new changes were pulled from upstream

What should happen instead:

  • Mirror repositories should determine the most recent commit timestamp in a mirror repository (for all synced branches), and use that timestamp to when determining the repository order to display on the user profile page.
Originally created by @smkent on GitHub (Dec 21, 2017). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.3.1 - Git version: 2.13.6 - Operating system: Gentoo Linux - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) https://try.gitea.io/testrepo1/gitea-mirror-test - [ ] No - [ ] Not relevant - Log gist: ## Description Every time a mirror repository syncs with its upstream repository (every 8 hours by default), the Gitea mirror repository's last updated time is set to the current time even if there are no upstream changes. This continually causes mirror repositories to be listed higher than other repositories in the Gitea user profile page that contains mirror repositories. Gitea should instead use the most recent commit time in a mirror repository when determining profile page repository ordering. This can be reproduced with the following steps: 1. Create a mirror repository and wait for it to finish syncing. 2. Create a new source repository and push some content to it. 3. View the user profile for the two created repositories, and note that the source repository is listed first. 4. Open the mirror repository, click Settings, and under Mirror Settings click "Sync Now" 5. Return to the user profile page, and note that the mirror repository is now listed first (with a more recent updated time) even if no new changes were pulled from upstream What should happen instead: * Mirror repositories should determine the most recent commit timestamp in a mirror repository (for all synced branches), and use that timestamp to when determining the repository order to display on the user profile page.
GiteaMirror added the issue/duplicate label 2025-11-02 03:59:31 -06:00
Author
Owner

@lafriks commented on GitHub (Dec 21, 2017):

Duplicate of #1329

@lafriks commented on GitHub (Dec 21, 2017): Duplicate of #1329
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1397