summaryrefslogtreecommitdiff
path: root/lib/gitlab/github_import/importer/pull_request_importer.rb
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2019-05-02 16:48:02 -0300
committerFelipe Artur <felipefac@gmail.com>2019-05-06 15:01:53 -0300
commit7e255f6793b8ff86777ccba087c9a76872a3819c (patch)
tree6573083d4b42e6167ca1f1222dab430ed7d19664 /lib/gitlab/github_import/importer/pull_request_importer.rb
parentf98758753a73841d2374aad986ae795da828ddca (diff)
downloadgitlab-ce-issue_57906_fix_github_import.tar.gz
Fix issuables state_id nil when importing projects from GitHubissue_57906_fix_github_import
Issues and merge requests imported from GitHub are having state_id set to null. This fixes the GitHub project importer and schedule migrations to fix state_id.
Diffstat (limited to 'lib/gitlab/github_import/importer/pull_request_importer.rb')
-rw-r--r--lib/gitlab/github_import/importer/pull_request_importer.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gitlab/github_import/importer/pull_request_importer.rb b/lib/gitlab/github_import/importer/pull_request_importer.rb
index 1b293ddc7c7..377e873d24d 100644
--- a/lib/gitlab/github_import/importer/pull_request_importer.rb
+++ b/lib/gitlab/github_import/importer/pull_request_importer.rb
@@ -55,6 +55,7 @@ module Gitlab
source_branch: pull_request.formatted_source_branch,
target_branch: pull_request.target_branch,
state: pull_request.state,
+ state_id: ::MergeRequest.available_states[pull_request.state],
milestone_id: milestone_finder.id_for(pull_request),
author_id: author_id,
assignee_id: user_finder.assignee_id_for(pull_request),