diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-10 18:06:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-10 18:06:07 +0300 |
commit | d96abbee0b394ac40eb67253214fb9c41a31bd41 (patch) | |
tree | 4887c6f08cc902c79e2a31d21a85ce7909cf88bc /lib | |
parent | 69849c280c5525d132ebaddb1200c390a42ecc06 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/internal/base.rb | 16 | ||||
-rw-r--r-- | lib/gitlab/github_import/importer/releases_importer.rb | 3 | ||||
-rw-r--r-- | lib/gitlab/legacy_github_import/release_formatter.rb | 3 |
3 files changed, 4 insertions, 18 deletions
diff --git a/lib/api/internal/base.rb b/lib/api/internal/base.rb index 1fe884eea13..00e9b56b932 100644 --- a/lib/api/internal/base.rb +++ b/lib/api/internal/base.rb @@ -148,22 +148,6 @@ module API } end - get "/broadcast_messages" do - if messages = BroadcastMessage.current - present messages, with: Entities::BroadcastMessage - else - [] - end - end - - get "/broadcast_message" do - if message = BroadcastMessage.current&.last - present message, with: Entities::BroadcastMessage - else - {} - end - end - # rubocop: disable CodeReuse/ActiveRecord post '/two_factor_recovery_codes' do status 200 diff --git a/lib/gitlab/github_import/importer/releases_importer.rb b/lib/gitlab/github_import/importer/releases_importer.rb index 1881f715c99..a3734ccf069 100644 --- a/lib/gitlab/github_import/importer/releases_importer.rb +++ b/lib/gitlab/github_import/importer/releases_importer.rb @@ -37,7 +37,8 @@ module Gitlab description: description_for(release), created_at: release.created_at, updated_at: release.created_at, - released_at: release.published_at, + # Draft releases will have a null published_at + released_at: release.published_at || Time.current, project_id: project.id } end diff --git a/lib/gitlab/legacy_github_import/release_formatter.rb b/lib/gitlab/legacy_github_import/release_formatter.rb index fdab6b512ea..a083ae60726 100644 --- a/lib/gitlab/legacy_github_import/release_formatter.rb +++ b/lib/gitlab/legacy_github_import/release_formatter.rb @@ -10,7 +10,8 @@ module Gitlab name: raw_data.name, description: raw_data.body, created_at: raw_data.created_at, - released_at: raw_data.published_at, + # Draft releases will have a null published_at + released_at: raw_data.published_at || Time.current, updated_at: raw_data.created_at } end |