Skip to content

Fix 'Object not found - no match for id (sha)' when importing GitHub PRs

Douglas Barbosa Alexandre requested to merge fix/29093 into master

What does this MR do?

When the branch exists, check if the sha is part of the branch we found, otherwise fallback to create a new branch with a pattern we already use to import removed branches.

Are there points in the code the reviewer needs to double check?

Gitlab::GithubImporter::BranchFormatter#commit_exists?

Why was this MR needed?

There are some edges cases where PRs were not imported.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Fixes #29093 (closed)

cc @brodock @xiaogang_gitlab @balameb

Merge request reports