diff options
author | Sean McGivern <sean@gitlab.com> | 2019-05-06 19:45:18 +0000 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-05-06 19:45:18 +0000 |
commit | b80893c251c462db88d433ebddb9019c2e97a9bc (patch) | |
tree | e41ea99f73a250154b8923eb2cca0ca1ce57ad61 /lib | |
parent | adc83d25a7ebf636941f72881a8828e6ebb5ad64 (diff) | |
parent | c40bad741f963f0b3bf3868d485e419dbbf7b37c (diff) | |
download | gitlab-ce-b80893c251c462db88d433ebddb9019c2e97a9bc.tar.gz |
Merge branch 'issue_57906_fix_github_import' into 'master'
Fix issuables state_id nil when importing projects from GitHub
Closes #57906
See merge request gitlab-org/gitlab-ce!28027
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/bitbucket_server_import/importer.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/github_import/importer/issue_importer.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/github_import/importer/pull_request_importer.rb | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/lib/gitlab/bitbucket_server_import/importer.rb b/lib/gitlab/bitbucket_server_import/importer.rb index 1d3ddeeb0f1..ff2694abd5e 100644 --- a/lib/gitlab/bitbucket_server_import/importer.rb +++ b/lib/gitlab/bitbucket_server_import/importer.rb @@ -201,6 +201,7 @@ module Gitlab target_branch: Gitlab::Git.ref_name(pull_request.target_branch_name), target_branch_sha: pull_request.target_branch_sha, state: pull_request.state, + state_id: MergeRequest.available_states[pull_request.state], author_id: author_id, assignee_id: nil, created_at: pull_request.created_at, diff --git a/lib/gitlab/github_import/importer/issue_importer.rb b/lib/gitlab/github_import/importer/issue_importer.rb index 656d46b6a7d..a468f6d8821 100644 --- a/lib/gitlab/github_import/importer/issue_importer.rb +++ b/lib/gitlab/github_import/importer/issue_importer.rb @@ -53,6 +53,7 @@ module Gitlab description: description, milestone_id: milestone_finder.id_for(issue), state: issue.state, + state_id: ::Issue.available_states[issue.state], created_at: issue.created_at, updated_at: issue.updated_at } 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), |