f5727da fix: Sort releases by published_at instead of created_at
📊 Changes
1 file changed (+41 additions, -39 deletions)
View changed files
📝src/lib/gitea.ts (+41 -39)
📄 Description
GitHub's Sorting:
GitHub sorts releases by published_at DESC (newest first)
The API returns them in this order by default
Our Processing:
Fetch releases from GitHub (sorted by published_at DESC)
Sort by published_at DESC, take top N releases
Reverse to process oldest → newest (so oldest gets created first in Gitea)
Create in Gitea with 1-second delays between each
Oldest release → created first → smallest created_unix
Newest release → created last → largest created_unix
Gitea displays sorted by created_unix DESC → newest first
Result: Gitea shows releases in the same order as GitHub ✅
For the Retro-Crisis repo specifically:
GitHub shows: 20250928 (Sep 28) → 20250831 (Aug 31) → 20250825 (Aug 25) → ...
Gitea will now show: 20250928 → 20250831 → 20250825 → ... (same order!)
The key fix was changing from created_at ?? published_at to published_at ?? created_at, because:
created_at = when git tag was created (commit date)
published_at = when release was published on GitHub
For repos where multiple tags share the same commit, they have the same created_at but different published_at dates. Using published_at first ensures we respect the actual release publication order, not just the tag/commit date.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/RayLabsHQ/gitea-mirror/pull/151
**Author:** [@arunavo4](https://github.com/arunavo4)
**Created:** 11/8/2025
**Status:** ✅ Merged
**Merged:** 11/8/2025
**Merged by:** [@arunavo4](https://github.com/arunavo4)
**Base:** `main` ← **Head:** `148-release-order-fix-for-same-created-date`
---
### 📝 Commits (1)
- [`f5727da`](https://github.com/RayLabsHQ/gitea-mirror/commit/f5727daedb23af1e24101b6d81815c7689c6331d) fix: Sort releases by published_at instead of created_at
### 📊 Changes
**1 file changed** (+41 additions, -39 deletions)
<details>
<summary>View changed files</summary>
📝 `src/lib/gitea.ts` (+41 -39)
</details>
### 📄 Description
GitHub's Sorting:
GitHub sorts releases by published_at DESC (newest first)
The API returns them in this order by default
Our Processing:
Fetch releases from GitHub (sorted by published_at DESC)
Sort by published_at DESC, take top N releases
Reverse to process oldest → newest (so oldest gets created first in Gitea)
Create in Gitea with 1-second delays between each
Oldest release → created first → smallest created_unix
Newest release → created last → largest created_unix
Gitea displays sorted by created_unix DESC → newest first
Result: Gitea shows releases in the same order as GitHub ✅
For the Retro-Crisis repo specifically:
GitHub shows: 20250928 (Sep 28) → 20250831 (Aug 31) → 20250825 (Aug 25) → ...
Gitea will now show: 20250928 → 20250831 → 20250825 → ... (same order!)
The key fix was changing from created_at ?? published_at to published_at ?? created_at, because:
created_at = when git tag was created (commit date)
published_at = when release was published on GitHub
For repos where multiple tags share the same commit, they have the same created_at but different published_at dates. Using published_at first ensures we respect the actual release publication order, not just the tag/commit date.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/RayLabsHQ/gitea-mirror/pull/151
Author: @arunavo4
Created: 11/8/2025
Status: ✅ Merged
Merged: 11/8/2025
Merged by: @arunavo4
Base:
main← Head:148-release-order-fix-for-same-created-date📝 Commits (1)
f5727dafix: Sort releases by published_at instead of created_at📊 Changes
1 file changed (+41 additions, -39 deletions)
View changed files
📝
src/lib/gitea.ts(+41 -39)📄 Description
GitHub's Sorting:
GitHub sorts releases by published_at DESC (newest first)
The API returns them in this order by default
Our Processing:
Fetch releases from GitHub (sorted by published_at DESC)
Sort by published_at DESC, take top N releases
Reverse to process oldest → newest (so oldest gets created first in Gitea)
Create in Gitea with 1-second delays between each
Oldest release → created first → smallest created_unix
Newest release → created last → largest created_unix
Gitea displays sorted by created_unix DESC → newest first
Result: Gitea shows releases in the same order as GitHub ✅
For the Retro-Crisis repo specifically:
GitHub shows: 20250928 (Sep 28) → 20250831 (Aug 31) → 20250825 (Aug 25) → ...
Gitea will now show: 20250928 → 20250831 → 20250825 → ... (same order!)
The key fix was changing from created_at ?? published_at to published_at ?? created_at, because:
created_at = when git tag was created (commit date)
published_at = when release was published on GitHub
For repos where multiple tags share the same commit, they have the same created_at but different published_at dates. Using published_at first ensures we respect the actual release publication order, not just the tag/commit date.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.