forgejo/services
Antonin Delpeuch 5f528dd85f
[GITEA] Avoid conflicts of issue and PR numbers in GitLab migration (#1790)
Closes #1789.

The bug was due to the fact that GitLab does not guarantee that issue numbers are created sequentially: some identifiers can be skipped. Therefore, the new pull requests numbers should not be offset by the number of issues, but by the maximum issue number.

See for instance https://gitlab.com/troyengel/archbuild/-/issues/?sort=created_date&state=all&first_page_size=20, where there is only a singe issue with number "2".

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1790
Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu>
Co-committed-by: Antonin Delpeuch <antonin@delpeuch.eu>
(cherry picked from commit 2c185c39fe)
(cherry picked from commit 8f68dc4c9c)
(cherry picked from commit 7e932b7fca)
(cherry picked from commit 6bbe75ecf8)
(cherry picked from commit b18c2e8d65)

Conflicts:
	services/migrations/gitlab.go
	https://codeberg.org/forgejo/forgejo/pulls/2075
(cherry picked from commit abc129c762)
(cherry picked from commit 28884fac10)
2024-01-15 16:11:58 +00:00
..
actions Fix schedule tasks bugs (#28691) 2024-01-12 21:50:38 +00:00
agit
asymkey Move more functions to db.Find (#28419) 2024-01-15 02:19:25 +00:00
attachment [FEAT] allow setting the update date on issues and comments 2024-01-15 14:48:04 +00:00
auth [SECURITY] Rework long-term authentication 2024-01-15 14:48:04 +00:00
automerge
context
convert Add branch protection setting for ignoring stale approvals (#28498) 2024-01-15 07:20:01 +00:00
cron
externalaccount
feed
forgejo [UPGRADE] run sanity checks before the database is upgraded 2024-01-15 14:48:04 +00:00
forms Add branch protection setting for ignoring stale approvals (#28498) 2024-01-15 07:20:01 +00:00
gitdiff
indexer
issue [FEAT] allow setting the update date on issues and comments 2024-01-15 14:48:04 +00:00
lfs [GITEA] Drop sha256-simd in favor of stdlib 2024-01-15 16:11:57 +00:00
mailer [GITEA] Drop sha256-simd in favor of stdlib 2024-01-15 16:11:57 +00:00
markup
migrations [GITEA] Avoid conflicts of issue and PR numbers in GitLab migration (#1790) 2024-01-15 16:11:58 +00:00
mirror
notify [GITEA] notifies admins on new user registration 2024-01-15 16:11:57 +00:00
org
packages
pull [GITEA] Use existing error functionality 2024-01-15 16:11:58 +00:00
release
repository Move more functions to db.Find (#28419) 2024-01-15 02:19:25 +00:00
secrets
task
uinotification
user Forbid removing the last admin user (#28337) 2024-01-15 06:51:43 +00:00
webhook [GITEA] Drop sha256-simd in favor of stdlib 2024-01-15 16:11:57 +00:00
wiki Fix schedule tasks bugs (#28691) 2024-01-12 21:50:38 +00:00