forgejo/services/migrations/testdata/gitlab/skipped_issue_number
Antonin Delpeuch 28884fac10
[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)
2024-01-08 17:05:47 +01:00
..
_api_v4_projects_6590996 [GITEA] Avoid conflicts of issue and PR numbers in GitLab migration (#1790) 2024-01-08 17:05:47 +01:00
_api_v4_projects_6590996_issues?page=1&per_page=10&sort=asc&state=all [GITEA] Avoid conflicts of issue and PR numbers in GitLab migration (#1790) 2024-01-08 17:05:47 +01:00
_api_v4_projects_6590996_issues_2_award_emoji?page=1&per_page=10 [GITEA] Avoid conflicts of issue and PR numbers in GitLab migration (#1790) 2024-01-08 17:05:47 +01:00
_api_v4_projects_6590996_merge_requests?page=1&per_page=10&view=simple [GITEA] Avoid conflicts of issue and PR numbers in GitLab migration (#1790) 2024-01-08 17:05:47 +01:00
_api_v4_projects_6590996_merge_requests_1 [GITEA] Avoid conflicts of issue and PR numbers in GitLab migration (#1790) 2024-01-08 17:05:47 +01:00
_api_v4_projects_6590996_merge_requests_1_award_emoji?page=1&per_page=10 [GITEA] Avoid conflicts of issue and PR numbers in GitLab migration (#1790) 2024-01-08 17:05:47 +01:00
_api_v4_projects_troyengel%2Farchbuild [GITEA] Avoid conflicts of issue and PR numbers in GitLab migration (#1790) 2024-01-08 17:05:47 +01:00
_api_v4_version [GITEA] Avoid conflicts of issue and PR numbers in GitLab migration (#1790) 2024-01-08 17:05:47 +01:00