mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-04-25 07:15:57 +03:00
[GH-ISSUE #126] Chronological ordering of issues and PR's in Gitea #63
Labels
No labels
bug
documentation
enhancement
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/gitea-mirror#63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mayankchetan on GitHub (Oct 23, 2025).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/126
Originally assigned to: @arunavo4 on GitHub.
Thank you so much for this awesome project!! Using this to archive open source research tools. Have it setup and running via docker-compose.
I noticed that the issues and PR's added to Gitea tend to be in reverse chronological order (mostly) of those on GitHub. I'm guessing (haven't read thru the code) its based on the pages GitHub serves via the API.
Would it be possible to use either the issue/PR posted date/# on GitHub to order their creation in Gitea? This way the issue ordering for very active and large repositories are preserved.
Here's an example for https://github.com/WISDEM/WISDEM:
Closed issues are sorted by 'Newest` on GitHub

Closed issues are sorted by 'Oldest` on Gitea instance

Thanks!
Mayank
@arunavo4 commented on GitHub (Oct 23, 2025):
@mayankchetan Thanks for your feedback I have not realised this before I have updated the ordering from the github API. but since we use parallel API calls to gitea to create these issues we will end up with some out of order items. If you need this to be deterministic and cannot afford any noise, then set this new env var
MIRROR_ISSUE_CONCURRENCY=1 / MIRROR_PULL_REQUEST_CONCURRENCY=1Go ahead and test the docker image from this PR #128
@mayankchetan commented on GitHub (Oct 23, 2025):
Thanks @arunavo4! that works almost perfectly! Still some race condition going on there, but that should be OK.
Could the date be added in the Gitea issues where it says
Originally created by <<user>> on GitHub.and<<user2>> commented on GitHub:?Maybe something like:
Originally created by <<user>> on GitHub (<<date>>, <<time>>, <<TZ>>)&<<user2>> commented on GitHub (<<date>>, <<time>>, <<TZ>>):That would really help keep the discussion timeline consistent with the original repository. I'm trying to mirror the repositories for posterity, so all the metadata is quite important.
Sorry if these requests are too many, I'm not familiar with TypeScript.
I've come across a few more bugs & possible QoL improvements, will raise separate issues for them.
Really appreciate your work on this tool!!
@arunavo4 commented on GitHub (Oct 24, 2025):
@mayankchetan Here check this version
docker pull ghcr.io/raylabshq/gitea-mirror:e99f320@mayankchetan commented on GitHub (Oct 24, 2025):
Tested and working perfectly! The issues & PRs are now ordered!! Thank you!!
I might still take a pass at adding the GitHub date when writing the Gitea issue. Might be a niche requirement vs others. :)
Appreciate your quick responses @arunavo4! Please feel free to close this issue!
@arunavo4 commented on GitHub (Oct 24, 2025):
@mayankchetan awesome, but this does make the issue and PR creation 3-5x slower since you are opting for perfect ordering. For that I have made it an ENV variable that you can pass please pass these
MIRROR_ISSUE_CONCURRENCY=1 / MIRROR_PULL_REQUEST_CONCURRENCY=1regarding the Github date, where are you looking to add that? the Issue description?
@mayankchetan commented on GitHub (Oct 24, 2025):
Yeah! I did notice the slowdown, but i'm fine with that since the historical nature of the repository is a higher priority. I think it'd be best to set the number higher as default for other users (noticed in your recent commits the default was 1?).
As for the Github date, yeah, as an example Gitea shows this:
So if the
Originally created by @dykesk on GitHub.and@dykesk commented on GitHub:Could be replaced by something like
Originally created by @dykesk on GitHub (Oct 20, 2014).and@dykesk commented on GitHub(Jul 8, 2015):it would add a lot of value to preservation of repositories.@arunavo4 commented on GitHub (Oct 24, 2025):
@mayankchetan Okay I think this is useful. and yea I will change back the defaults I wanted to make sure you were using the Env variables.
@arunavo4 commented on GitHub (Oct 24, 2025):
@mayankchetan Here try this one
docker pull ghcr.io/raylabshq/gitea-mirror:929d49ehas comments added@mayankchetan commented on GitHub (Oct 24, 2025):
Tested!
Perfect!! Thank you so much for the quick fixes!!
@arunavo4 commented on GitHub (Oct 24, 2025):
Great feel free to let me know if more QoL improvements are needed. But I might be only able to tackle them on the weekend.