BigW Consortium Gitlab
Fix importer for GitHub Pull Requests when a branch was reused across Pull Requests Closes #17766 ## What does this MR do? GitHub importer fails when a repository has two Pull Requests, with the same branch name and different SHA, one of which was closed without merging, and one which is open or was merged in. This happens because we only checks if the branch exists in the [Gitlab::GithubImport::BranchFormatter#exists?](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/github_import/branch_formatter.rb#L6-8), before creating the missing references on Github. With this MR we check if both branch, and SHA exists in the current project. If no, we create the missing reference on GitHub before import the PR. ## Are there points in the code the reviewer needs to double check? Nope. ## Why was this MR needed? Github importer will fail if branch was reused across Pull Requests. ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/issues/19439 /cc @royaldark @thomasjachmann See merge request !5103
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
config | Loading commit data... | |
controllers | Loading commit data... | |
factories | Loading commit data... | |
features | Loading commit data... | |
finders | Loading commit data... | |
fixtures | Loading commit data... | |
helpers | Loading commit data... | |
initializers | Loading commit data... | |
javascripts | Loading commit data... | |
lib | Loading commit data... | |
mailers | Loading commit data... | |
models | Loading commit data... | |
requests | Loading commit data... | |
routing | Loading commit data... | |
services | Loading commit data... | |
support | Loading commit data... | |
tasks/gitlab | Loading commit data... | |
views | Loading commit data... | |
workers | Loading commit data... | |
factories_spec.rb | Loading commit data... | |
rails_helper.rb | Loading commit data... | |
spec_helper.rb | Loading commit data... | |
teaspoon_env.rb | Loading commit data... |