summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gitlab/legacy_github_import/release_formatter.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/legacy_github_import/release_formatter.rb b/lib/gitlab/legacy_github_import/release_formatter.rb
index 8c0c17780ca..85bbdf8cfb0 100644
--- a/lib/gitlab/legacy_github_import/release_formatter.rb
+++ b/lib/gitlab/legacy_github_import/release_formatter.rb
@@ -7,6 +7,8 @@ module Gitlab
{
project: project,
tag: raw_data.tag_name,
+ name: raw_data.name,
+ sha: sha,
description: raw_data.body,
created_at: raw_data.created_at,
updated_at: raw_data.created_at
@@ -24,6 +26,10 @@ module Gitlab
def valid?
!raw_data.draft
end
+
+ def sha
+ project.repository.find_tag(raw_data.tag_name).dereferenced_target.id
+ end
end
end
end