Commit 2b304239 authored by Cindy Pallares 🦉's avatar Cindy Pallares 🦉 Committed by Mayra Cabrera

Add a field for released_at to GH importer

parent 136c3efe
---
title: Add a field for released_at to GH importer
merge_request: 31496
author:
type: fixed
...@@ -36,6 +36,7 @@ module Gitlab ...@@ -36,6 +36,7 @@ module Gitlab
description: description_for(release), description: description_for(release),
created_at: release.created_at, created_at: release.created_at,
updated_at: release.updated_at, updated_at: release.updated_at,
released_at: release.published_at,
project_id: project.id project_id: project.id
} }
end end
......
...@@ -6,6 +6,7 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do ...@@ -6,6 +6,7 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
let(:importer) { described_class.new(project, client) } let(:importer) { described_class.new(project, client) }
let(:created_at) { Time.new(2017, 1, 1, 12, 00) } let(:created_at) { Time.new(2017, 1, 1, 12, 00) }
let(:updated_at) { Time.new(2017, 1, 1, 12, 15) } let(:updated_at) { Time.new(2017, 1, 1, 12, 15) }
let(:released_at) { Time.new(2017, 1, 1, 12, 00) }
let(:release) do let(:release) do
double( double(
...@@ -13,7 +14,8 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do ...@@ -13,7 +14,8 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
tag_name: '1.0', tag_name: '1.0',
body: 'This is my release', body: 'This is my release',
created_at: created_at, created_at: created_at,
updated_at: updated_at updated_at: updated_at,
published_at: released_at
) )
end end
...@@ -23,7 +25,8 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do ...@@ -23,7 +25,8 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
tag_name: '1.0', tag_name: '1.0',
description: 'This is my release', description: 'This is my release',
created_at: created_at, created_at: created_at,
updated_at: updated_at updated_at: updated_at,
released_at: released_at
} }
expect(importer).to receive(:build_releases).and_return([release_hash]) expect(importer).to receive(:build_releases).and_return([release_hash])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment