-
-
Notifications
You must be signed in to change notification settings - Fork 36
fix: Sort releases by published_at instead of created_at #151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Deploying gitea-mirror-website with
|
| Latest commit: |
f5727da
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1b72c931.gitea-mirror-website.pages.dev |
| Branch Preview URL: | https://148-release-order-fix-for-sa.gitea-mirror-website.pages.dev |
🐳 Docker Image Built SuccessfullyYour PR image is available for testing: Image Tag: Pull and Testdocker pull ghcr.io/raylabshq/gitea-mirror:pr-151
docker run -d -p 4321:4321 -e BETTER_AUTH_SECRET=your-secret-here -e BETTER_AUTH_URL=http://localhost:4321 --name gitea-mirror-test ghcr.io/raylabshq/gitea-mirror:pr-151Docker Compose Testingservices:
gitea-mirror:
image: ghcr.io/raylabshq/gitea-mirror:pr-151
ports:
- "4321:4321"
environment:
- BETTER_AUTH_SECRET=your-secret-here
- BETTER_AUTH_URL=http://localhost:4321
- BETTER_AUTH_TRUSTED_ORIGINS=http://localhost:4321
📦 View in GitHub Packages |
🔍 Vulnerabilities of
|
| digest | sha256:186d57cc717f3a8b45cf4c9c628caea7bd19e188afe8af389b2324b218c67dd9 |
| vulnerabilities | |
| platform | linux/amd64 |
| size | 304 MB |
| packages | 894 |
📦 Base Image alpine:3.20
| also known as |
|
| digest | sha256:008827ed2172a676b08121e21cf9db0ce08a90ee6c8a12fc374af8a56c0e496d |
| vulnerabilities |
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||
Description |
Overview
Labels (8 changes)
-org.opencontainers.image.created=2025-11-08T05:30:35.828Z
+org.opencontainers.image.created=2025-10-22T07:56:38.047Z
-org.opencontainers.image.description=Gitea Mirror auto-syncs GitHub repos to your self-hosted Gitea/Forgejo, with a sleek Web UI and easy Docker deployment.
+org.opencontainers.image.description=Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
-org.opencontainers.image.licenses=AGPL-3.0
+org.opencontainers.image.licenses=NOASSERTION
-org.opencontainers.image.revision=f5727daedb23af1e24101b6d81815c7689c6331d
+org.opencontainers.image.revision=89fa0f343945e61d5e4a0077cc7e93a802ed56e7
-org.opencontainers.image.source=https://github.com/RayLabsHQ/gitea-mirror
+org.opencontainers.image.source=https://github.com/oven-sh/bun
-org.opencontainers.image.title=gitea-mirror
+org.opencontainers.image.title=bun
-org.opencontainers.image.url=https://github.com/RayLabsHQ/gitea-mirror
+org.opencontainers.image.url=https://github.com/oven-sh/bun
-org.opencontainers.image.version=pr-151
+org.opencontainers.image.version=1.3.1-alpine |
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.