forgejo/services/migrations/testdata/gitlab/skipped_issue_number/_api_v4_version
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

22 lines
985 B
Plaintext

Ratelimit-Observed: 1
X-Gitlab-Meta: {"correlation_id":"aa75720bd9c597c7f2f886a4042d1f80","version":"1"}
Etag: W/"4e5c0a031c3aacb6ba0a3c19e67d7592"
X-Content-Type-Options: nosniff
Ratelimit-Limit: 2000
Ratelimit-Resettime: Thu, 30 Nov 2023 08:24:53 GMT
X-Runtime: 0.039899
Ratelimit-Remaining: 1999
Set-Cookie: _cfuvid=7OAEitQ3J0BOxrXk2pMBApFg1KFnz5aBVqOY7mHwLRk-1701332633452-0-604800000; path=/; domain=.gitlab.com; HttpOnly; Secure; SameSite=None
Content-Security-Policy: default-src 'none'
Gitlab-Sv: localhost
Cf-Cache-Status: MISS
Vary: Origin, Accept-Encoding
X-Frame-Options: SAMEORIGIN
Cache-Control: max-age=0, private, must-revalidate
Strict-Transport-Security: max-age=31536000
Referrer-Policy: strict-origin-when-cross-origin
Ratelimit-Reset: 1701332693
Gitlab-Lb: haproxy-main-39-lb-gprd
Content-Type: application/json
{"version":"16.7.0-pre","revision":"acd848a9228","kas":{"enabled":true,"externalUrl":"wss://kas.gitlab.com","version":"v16.7.0-rc2"},"enterprise":true}