forgejo/services
forgejo-backport-action 52da8aab7e [v11.0/forgejo] fix(migrations): transfer PR flow information (#7437)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/7421

- When migrating a pull requests from a Gitea or Forgejo instance, check if the pull request was created via the AGit flow and transfer that bit of information to the migrated pull request.
- Expose this bit of information as the `flow` field for the pull request.
- We have to do a horrible Go hack with Gitea's [go-sdk](gitea.com/gitea/go-sdk) to list all pull requests while being able to decode it to a struct that contains the new `Flow` field. The library does not allow you to do this out of the box, so we have to use `go:linkname` to access the private method that allows us to do this. This in turn means we have to do some boilerplate code that the library otherwise would do for us. The better option would be forking, but that would be a hassle of keeping the library in sync.
- Resolves forgejo/forgejo#5848
- Unit test added.

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7437
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2025-04-03 07:35:20 +00:00
..
actions [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
agit [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
asymkey [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
attachment [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
auth [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
automerge [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
context [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
contexttest [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
convert [v11.0/forgejo] fix(migrations): transfer PR flow information (#7437) 2025-04-03 07:35:20 +00:00
cron [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
doctor [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
externalaccount [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
f3 [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
federation [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
feed [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
forgejo [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
forms [v11.0/forgejo] fix: validate input for default_{merge,update}_style (#7401) 2025-03-31 09:43:46 +00:00
gitdiff [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
indexer [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
issue [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
lfs [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
mailer [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
markup [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
migrations [v11.0/forgejo] fix(migrations): transfer PR flow information (#7437) 2025-04-03 07:35:20 +00:00
mirror [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
notify [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
org [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
packages [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
pull [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
release [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
remote [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
repository [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
secrets [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
shared/automerge [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
task [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
uinotification [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
user [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
webhook [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
wiki [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00