forgejo/services
forgejo-backport-action 19d920931d [v12.0/forgejo] fix: migration failing when importing either issues or PRs but not the other (#9121)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/8892

Related to https://codeberg.org/Codeberg/Community/issues/1944

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [x] in their respective `*_test.go` for unit tests.
  - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
  - A place for fix architecture is still in discussion with @fnetX
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [x] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

## What was done

* Allowed the githubdownloaderv3 to know whether issues and, or PRs are requested to migrate
* Used this information to decide to filter for "/pulls/" or "/issues"
  * Or not to filter at all if issues == true && prs == true
* Added isolated test for the downloader and for the uploader
* Created a new test_repo in github.com/forgejo and set it up properly together with @Gusted
* Updated github_downloader_test with the new URLs and test data from the repo
* Recorded the API calls for local testing
* Added a minimal gitbucket test (which uses the github downloader under the hood)

Co-authored-by: patdyn <patdyn@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9121
Reviewed-by: Earl Warren <earl-warren@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-09-02 10:31:10 +02:00
..
actions [v12.0/forgejo] fix: Actions workflows triggered by comments or labels to pull requests may access secrets (#9025) 2025-08-25 21:50:02 +02:00
agit [v12.0/forgejo] fix: correctly mark reviews as stale for AGit PRs (#8454) 2025-07-09 08:13:05 +02:00
asymkey
attachment fix: allow instance API URLs in release assets (#7644) 2025-06-09 10:01:59 +02:00
auth [v12.0/forgejo] fix: consistently enforce 2FA on OpenID 2.0 (#9097) 2025-08-30 18:45:00 +02:00
automerge fix: do not ignore automerge while a PR is checking for conflicts (#8189) 2025-06-17 10:58:07 +02:00
context [v12.0/forgejo] fix: only redirect to a new owner (organization or user) if the user has permissions to view the new owner (#9091) 2025-08-30 18:42:11 +02:00
contexttest
convert [v12.0/forgejo] fix: correctly get stats for API commits (#8758) 2025-08-02 13:46:34 +02:00
cron
doctor
externalaccount
f3
federation Federated user activity following: Isolated model changes (#8078) 2025-06-21 12:02:58 +02:00
feed Federated user activity following: Isolated model changes (#8078) 2025-06-21 12:02:58 +02:00
forgejo
forms [v12.0/forgejo] fix: email comments are removed from email addresses (#9083) 2025-08-30 18:45:30 +02:00
gitdiff [v12.0/forgejo] fix: expanding exactly 20 lines between diff sections leaves visual artifact (#8523) 2025-07-16 08:44:44 +02:00
indexer
issue [v12.0/forgejo] fix: add .forgejo/CODEOWNERS support (#8746) (#8790) 2025-08-07 14:29:03 +02:00
lfs
mailer [v12.0/forgejo] fix(email): actions notification template confuses branch with PR (#8455) 2025-07-09 10:20:54 +02:00
markup
migrations [v12.0/forgejo] fix: migration failing when importing either issues or PRs but not the other (#9121) 2025-09-02 10:31:10 +02:00
mirror
moderation
notify
org
packages [v12.0/forgejo] several fixes of ALT Package registry (#8480) 2025-07-10 21:57:46 +02:00
pull [v12.0/forgejo] fix: prevent pull requests from being merged multiple times (#8862) 2025-08-11 23:08:46 +02:00
redirect [v12.0/forgejo] fix: only redirect to a new owner (organization or user) if the user has permissions to view the new owner (#9091) 2025-08-30 18:42:11 +02:00
release
remote
repository [v12.0/forgejo] fix: pass doer's ID for CRUD instance signing (#8318) 2025-06-27 16:26:11 +02:00
secrets
shared/automerge fix: do not ignore automerge while a PR is checking for conflicts (#8189) 2025-06-17 10:58:07 +02:00
task
uinotification
user [v12.0/forgejo] fix: delete old auth token upon replacing primary email (#9087) 2025-08-30 18:44:17 +02:00
webhook bug: unify RepoActionRun and ActionRun structs (#8250) 2025-06-23 07:54:32 +02:00
wiki