Add a field for released_at to GH importer
This commit is contained in:
parent
136c3efe61
commit
2b30423935
3 changed files with 11 additions and 2 deletions
5
changelogs/unreleased/add-release-to-github-importer.yml
Normal file
5
changelogs/unreleased/add-release-to-github-importer.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Add a field for released_at to GH importer
|
||||
merge_request: 31496
|
||||
author:
|
||||
type: fixed
|
|
@ -36,6 +36,7 @@ module Gitlab
|
|||
description: description_for(release),
|
||||
created_at: release.created_at,
|
||||
updated_at: release.updated_at,
|
||||
released_at: release.published_at,
|
||||
project_id: project.id
|
||||
}
|
||||
end
|
||||
|
|
|
@ -6,6 +6,7 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
|
|||
let(:importer) { described_class.new(project, client) }
|
||||
let(:created_at) { Time.new(2017, 1, 1, 12, 00) }
|
||||
let(:updated_at) { Time.new(2017, 1, 1, 12, 15) }
|
||||
let(:released_at) { Time.new(2017, 1, 1, 12, 00) }
|
||||
|
||||
let(:release) do
|
||||
double(
|
||||
|
@ -13,7 +14,8 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
|
|||
tag_name: '1.0',
|
||||
body: 'This is my release',
|
||||
created_at: created_at,
|
||||
updated_at: updated_at
|
||||
updated_at: updated_at,
|
||||
published_at: released_at
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -23,7 +25,8 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
|
|||
tag_name: '1.0',
|
||||
description: 'This is my release',
|
||||
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])
|
||||
|
|
Loading…
Reference in a new issue