mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 14:55:40 +03:00
02dae3f84b
Due to a bug in the GitLab API, the diff_refs field is populated in the response when fetching an individual merge request, but not when fetching a list of them. That field is used to populate the merge base commit SHA. While there is detection for the merge base even when not populated by the downloader, that detection is not flawless. Specifically, when a GitLab merge request has a single commit, and gets merged with the squash strategy, the base branch will be fast-forwarded instead of a separate squash or merge commit being created. The merge base detection attempts to find the last commit on the base branch that is also on the PR branch, but in the fast-forward case that is the PR's only commit. Assuming the head commit is also the merge base results in the import of a PR with 0 commits and no diff. This PR uses the individual merge request endpoint to fetch merge request data with the diff_refs field. With its data, the base merge commit can be properly set, which—by not relying on the detection mentioned above—correctly imports PRs that were "merged" by fast-forwarding the base branch. ref: https://gitlab.com/gitlab-org/gitlab/-/issues/29620 |
||
---|---|---|
.. | ||
codebase.go | ||
codebase_test.go | ||
common.go | ||
dump.go | ||
error.go | ||
git.go | ||
gitbucket.go | ||
gitea_downloader.go | ||
gitea_downloader_test.go | ||
gitea_uploader.go | ||
gitea_uploader_test.go | ||
github.go | ||
github_test.go | ||
gitlab.go | ||
gitlab_test.go | ||
gogs.go | ||
gogs_test.go | ||
http_client.go | ||
main_test.go | ||
migrate.go | ||
migrate_test.go | ||
onedev.go | ||
onedev_test.go | ||
restore.go | ||
update.go |