forgejo/services/migrations/testdata/gitlab/skipped_issue_number/_api_v4_projects_6590996_issues_2_award_emoji!page=1&per_page=10
Antonin Delpeuch 51fab30187
[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)
(cherry picked from commit 5f528dd85f)

(cherry picked from commit cb9b8a31b2)
(cherry picked from commit 97f02df163)
(cherry picked from commit 4611e10e6a)
2024-02-05 16:09:41 +01:00

31 lines
1.2 KiB
Plaintext

Gitlab-Sv: localhost
X-Content-Type-Options: nosniff
Gitlab-Lb: haproxy-main-25-lb-gprd
X-Total-Pages: 1
Referrer-Policy: strict-origin-when-cross-origin
Ratelimit-Observed: 5
Ratelimit-Remaining: 1995
Content-Security-Policy: default-src 'none'
X-Gitlab-Meta: {"correlation_id":"eeab46d836341bd4cb18e3d2e82abf97","version":"1"}
Ratelimit-Limit: 2000
Accept-Ranges: bytes
Content-Type: application/json
X-Page: 1
X-Frame-Options: SAMEORIGIN
X-Prev-Page:
Cf-Cache-Status: MISS
X-Total: 0
Ratelimit-Resettime: Thu, 30 Nov 2023 08:24:54 GMT
Link: <https://gitlab.com/api/v4/projects/6590996/issues/2/award_emoji?id=6590996&issue_iid=2&page=1&per_page=10>; rel="first", <https://gitlab.com/api/v4/projects/6590996/issues/2/award_emoji?id=6590996&issue_iid=2&page=1&per_page=10>; rel="last"
X-Per-Page: 10
Set-Cookie: _cfuvid=c5HuTPxOuSXdHSuVrXQALS.uV7WvAYfc5Mc_143EAB8-1701332634513-0-604800000; path=/; domain=.gitlab.com; HttpOnly; Secure; SameSite=None
Content-Length: 2
Vary: Origin, Accept-Encoding
Cache-Control: max-age=0, private, must-revalidate
Etag: W/"4f53cda18c2baa0c0354bb5f9a3ecbe5"
X-Runtime: 0.069269
Strict-Transport-Security: max-age=31536000
Ratelimit-Reset: 1701332694
X-Next-Page:
[]