Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-18 06:10:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-18 06:10:38 +0300
commitf24e50f0a55e872a2947ccb1af166b14883511b2 (patch)
tree0db04f6f1b893439887ee21b18a0ea027b5f62e6 /lib
parent5ee9033e9db11ce04f5cc6d7bda32f8059a1f405 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/github_import/representation/issue.rb1
-rw-r--r--lib/gitlab/github_import/representation/lfs_object.rb7
-rw-r--r--lib/gitlab/github_import/representation/pull_request.rb1
-rw-r--r--lib/gitlab/github_import/representation/user.rb6
4 files changed, 13 insertions, 2 deletions
diff --git a/lib/gitlab/github_import/representation/issue.rb b/lib/gitlab/github_import/representation/issue.rb
index f3071b3e2b3..0e04b5ad57f 100644
--- a/lib/gitlab/github_import/representation/issue.rb
+++ b/lib/gitlab/github_import/representation/issue.rb
@@ -25,6 +25,7 @@ module Gitlab
hash = {
iid: issue.number,
+ github_id: issue.number,
title: issue.title,
description: issue.body,
milestone_number: issue.milestone&.number,
diff --git a/lib/gitlab/github_import/representation/lfs_object.rb b/lib/gitlab/github_import/representation/lfs_object.rb
index a4606173f49..41723759645 100644
--- a/lib/gitlab/github_import/representation/lfs_object.rb
+++ b/lib/gitlab/github_import/representation/lfs_object.rb
@@ -13,7 +13,12 @@ module Gitlab
# Builds a lfs_object
def self.from_api_response(lfs_object)
- new({ oid: lfs_object.oid, link: lfs_object.link, size: lfs_object.size })
+ new(
+ oid: lfs_object.oid,
+ link: lfs_object.link,
+ size: lfs_object.size,
+ github_id: lfs_object.oid
+ )
end
# Builds a new lfs_object using a Hash that was built from a JSON payload.
diff --git a/lib/gitlab/github_import/representation/pull_request.rb b/lib/gitlab/github_import/representation/pull_request.rb
index be192762e05..e4f54fcc833 100644
--- a/lib/gitlab/github_import/representation/pull_request.rb
+++ b/lib/gitlab/github_import/representation/pull_request.rb
@@ -25,6 +25,7 @@ module Gitlab
hash = {
iid: pr.number,
+ github_id: pr.number,
title: pr.title,
description: pr.body,
source_branch: pr.head.ref,
diff --git a/lib/gitlab/github_import/representation/user.rb b/lib/gitlab/github_import/representation/user.rb
index e00dcfca33d..d97b90b6291 100644
--- a/lib/gitlab/github_import/representation/user.rb
+++ b/lib/gitlab/github_import/representation/user.rb
@@ -15,7 +15,11 @@ module Gitlab
#
# user - An instance of `Sawyer::Resource` containing the user details.
def self.from_api_response(user)
- new(id: user.id, login: user.login)
+ new(
+ id: user.id,
+ github_id: user.id,
+ login: user.login
+ )
end
# Builds a user using a Hash that was built from a JSON payload.