Commit 227e9ee5 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'jswain_whats_new_package_name_change' into 'master'

Package/plan name changes for whats_new

See merge request gitlab-org/gitlab!51648
parents 941a1dad 449d0ee4
......@@ -12,7 +12,7 @@ class WhatsNewController < ApplicationController
def index
respond_to do |format|
format.js do
render json: highlight_items
render json: highlights.items
end
end
end
......@@ -37,10 +37,6 @@ class WhatsNewController < ApplicationController
end
end
def highlight_items
highlights.map {|item| Gitlab::WhatsNew::ItemPresenter.present(item) }
end
def set_pagination_headers
response.set_header('X-Next-Page', highlights.next_page)
end
......
# frozen_string_literal: true
module Gitlab
module WhatsNew
class ItemPresenter
DICTIONARY = {
core: 'Free',
starter: 'Bronze',
premium: 'Silver',
ultimate: 'Gold'
}.freeze
def self.present(item)
if Gitlab.com?
item['packages'] = item['packages'].map { |p| DICTIONARY[p.downcase.to_sym] }
end
item
end
end
end
end
......@@ -20,7 +20,7 @@
stage: Release
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/ci/examples/authenticating-with-hashicorp-vault/index.html
image_url: https://about.gitlab.com/images/12_10/jwt-vault-1.png
published_at: 2020-04-22
......@@ -48,7 +48,7 @@
stage: Plan
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/import/jira.html
image_url: https://about.gitlab.com/images/12_10/jira-importer.png
published_at: 2020-04-22
......@@ -61,7 +61,7 @@
stage: Verify
self-managed: true
gitlab-com: false
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://gitlab.com/gitlab-org/ci-cd/custom-executor-drivers/fargate/-/blob/master/docs/README.md
image_url: https://about.gitlab.com/images/12_9/autoscaling_ci_fargate.png
published_at: 2020-04-22
......
......@@ -7,7 +7,7 @@
stage: Create
self-managed: true
gitlab-com: false
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/administration/gitaly/praefect.html
image_url: https://about.gitlab.com/images/13_0/praefect-architecture.png
published_at: 2020-05-22
......@@ -20,7 +20,7 @@
stage: Release
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/topics/autodevops/index.html#aws-ecs
image_url: https://docs.gitlab.com/ee/ci/img/ecs_dashboard_v12_9.png
published_at: 2020-05-22
......@@ -46,7 +46,7 @@
stage: Create
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/snippets.html#versioned-snippets
image_url: https://about.gitlab.com/images/13_0/phikai-versioned-snippets.png
published_at: 2020-05-22
......@@ -59,7 +59,7 @@
stage: Create
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/web_ide/#themes
image_url: https://about.gitlab.com/images/13_0/phikai-web-ide-dark-theme.png
published_at: 2020-05-22
......
......@@ -7,7 +7,7 @@
stage: Monitor
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/operations/alert_management.html
image_url: https://about.gitlab.com/images/13_1/alert_management.png
published_at: 2020-06-22
......@@ -20,7 +20,7 @@
stage: Verify
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/merge_requests/accessibility_testing.html#accessibility-merge-request-widget
image_url: https://about.gitlab.com/images/13_1/a11y-merge-request-widget.png
published_at: 2020-06-22
......@@ -31,18 +31,18 @@
stage: Create
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/issues/design_management.html#resolve-design-threads
image_url: https://about.gitlab.com/images/13_1/resolve-design-comment.gif
published_at: 2020-06-22
release: 13.1
- title: Merge Request Reviews moved to Core
- title: Merge Request Reviews moved to Free
body: |
Originally introduced in GitLab 11.4 as a GitLab Premium feature, Merge Request Reviews allow merge request reviewers to submit multiple comments at once, cutting down on notification noise for the merge request author, and allowing for a more cohesive and streamlined review process.
stage: Create
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/discussions/index.html#merge-request-reviews
image_url: https://about.gitlab.com/images/13_1/batch_comments.png
published_at: 2020-06-22
......
......@@ -7,7 +7,7 @@
stage: Plan
self-managed: true
gitlab-com: true
packages: [Starter, Premium, Ultimate]
packages: [Premium, Ultimate]
url: https://www.youtube.com/watch?v=31pNKjenlJY&feature=emb_title
image_url: https://img.youtube.com/vi/31pNKjenlJY/hqdefault.jpg
published_at: 2020-07-22
......@@ -20,7 +20,7 @@
stage: Defend
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://www.youtube.com/watch?v=WxBzBz76FxU&feature=youtu.be
image_url: https://img.youtube.com/vi/WxBzBz76FxU/hqdefault.jpg
published_at: 2020-07-22
......@@ -33,22 +33,22 @@
stage: Create
self-managed: false
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/issues/design_management.html#gitlab-figma-plugin
image_url: https://about.gitlab.com/images/13_2/figma-plugin.png
published_at: 2020-07-22
release: 13.2
- title: Cluster health monitoring now available in Core
- title: Cluster health monitoring now available in Free
body: |
To understand system performance, your development team must monitor the health and performance of the underlying infrastructure.
We want our metrics solution to be available to all GitLab users, so as part of our [2020 gift](https://about.gitlab.com/blog/2019/12/16/observability/), we’ve moved cluster health in the Monitor stage from GitLab Ultimate to GitLab Core.
We want our metrics solution to be available to all GitLab users, so as part of our [2020 gift](https://about.gitlab.com/blog/2019/12/16/observability/), we’ve moved cluster health in the Monitor stage from GitLab Ultimate to GitLab Free.
Beginning with GitLab 13.2, all users can connect a cluster and monitor its health in the GitLab user interface.
stage: Monitor
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/clusters/#visualizing-cluster-health
image_url: https://about.gitlab.com/images/13_2/k8s_cluster_monitoring.png
published_at: 2020-07-22
......
......@@ -18,7 +18,7 @@
stage: Verify
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/ci/yaml/#parallel-matrix-jobs
image_url: https://about.gitlab.com/images/13_3/cartesian-matrix.png
published_at: 2020-08-22
......@@ -46,7 +46,7 @@
stage: Secure
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/application_security/sast/#making-sast-analyzers-available-to-all-gitlab-tiers
image_url: https://about.gitlab.com/images/13_3/sast-gitlab-languages.png
published_at: 2020-08-22
......
......@@ -55,19 +55,6 @@
image_url: https://about.gitlab.com/images/13_4/instance_vulnerability_report.png
published_at: 2020-09-22
release: 13.4
- title: Feature Flags made available in GitLab Starter
body: |
Earlier this year, GitLab committed to [moving 18 features](https://about.gitlab.com/blog/2020/03/30/new-features-to-core/) to our open source core product. With this release of GitLab we've finished moving Feature Flags to Starter, and we are continuing to migrate our Feature Flag service to Core in [GitLab 13.5](https://gitlab.com/gitlab-org/gitlab/-/issues/212318).
We're excited about bringing these features to more users and seeing what use cases and workflows you use them for.
stage: Release
self-managed: true
gitlab-com: true
packages: [Starter, Premium, Ultimate]
url: https://www.youtube.com/embed/1FBRaBQTQZk
image_url: https://img.youtube.com/vi/1FBRaBQTQZk/hqdefault.jpg
published_at: 2020-09-22
release: 13.4
- title: Quick navigation using the Search bar
body: |
When navigating through GitLab, sometimes you just want to go to a specific project and not a search result page. Using the Global search bar, you can now quickly jump to recent issues, groups, projects, settings, and help topics.
......@@ -76,7 +63,7 @@
stage: Enablement
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/search/#autocomplete-suggestions
image_url: https://about.gitlab.com/images/13_4/enablement_global_search.gif
published_at: 2020-09-22
......
......@@ -39,7 +39,7 @@
stage: Create
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/snippets.html#multiple-files-by-snippet
image_url: https://about.gitlab.com/images/13_5/phikai-snippets-multiple-files.png
published_at: 2020-10-22
......@@ -52,7 +52,7 @@
stage: Verify
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/ci/runners/README.html#disable-shared-runners
image_url: https://about.gitlab.com/images/13_5/enable_shared_runners_v2.png
published_at: 2020-10-22
......@@ -65,7 +65,7 @@
stage: Release
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/operations/feature_flags.html#percent-rollout
image_url: https://about.gitlab.com/images/13_5/percent-rollout.png
published_at: 2020-10-22
......@@ -78,7 +78,7 @@
stage: Secure
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/application_security/sast/#supported-languages-and-frameworks
image_url: https://about.gitlab.com/images/13_5/sast-gitlab-mobile.png
published_at: 2020-10-22
......
......@@ -9,7 +9,7 @@
stage: Release
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/ci/cloud_deployment/#custom-build-job-for-auto-devops
image_url: https://img.youtube.com/vi/4B-qSwKnacA/hqdefault.jpg
published_at: 2020-11-22
......@@ -22,7 +22,7 @@
stage: Verify
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html#code-quality-widget
image_url: https://about.gitlab.com/images/13_6/code_quality_severity.png
published_at: 2020-11-22
......@@ -58,7 +58,7 @@
stage: Create
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/admin_area/settings/project_integration_management.html
image_url: https://about.gitlab.com/images/13_6/project-integration-inheriting-settings.png
published_at: 2020-11-22
......@@ -75,7 +75,7 @@
stage: Plan
self-managed: true
gitlab-com: true
packages: [Starter, Premium, Ultimate]
packages: [Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/milestones/burndown_and_burnup_charts.html#burnup-charts
image_url: https://about.gitlab.com/images/13_6/burnup-chart.png
published_at: 2020-11-22
......
......@@ -20,7 +20,7 @@
stage: Create
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/merge_requests/getting_started#reviewer
image_url: https://about.gitlab.com/images/13_7/reviewers_sidebar.png
published_at: 2020-12-22
......@@ -33,13 +33,13 @@
stage: Plan
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/quick_actions.html
image_url: https://about.gitlab.com/images/13_7/clone_issue_with_quick_action.png
published_at: 2020-12-22
release: 13.7
- title: GitLab Runner for Red Hat OpenShift
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
self-managed: true
gitlab-com: true
url: 'https://docs.gitlab.com/runner/install/openshift.html'
......
......@@ -7,7 +7,7 @@
stage: Verify
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/ci/pipeline_editor/index.html
image_url: https://img.youtube.com/vi/MQpSyvMpsHA/hqdefault.jpg
published_at: 2021-01-22
......@@ -18,7 +18,7 @@
stage: verify
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/ci/yaml/visualization.html
image_url: https://about.gitlab.com/images/13_8/pipeline_visual_builder.png
published_at: 2021-01-22
......@@ -40,7 +40,7 @@
stage: plan
self-managed: true
gitlab-com: true
packages: [Starter, Premium, Ultimate]
packages: [Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/issue_board.html#configurable-issue-boards
image_url: https://about.gitlab.com/images/13_8/scope_board_to_current_iteration.png
published_at: 2021-01-22
......@@ -51,7 +51,7 @@
stage: Release
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/ci/pipelines/job_artifacts.html#downloading-artifacts
image_url: https://about.gitlab.com/images/13_8/artifact_mr.png
published_at: 2021-01-22
......@@ -64,7 +64,7 @@
stage: create
self-managed: true
gitlab-com: true
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/quick_actions.html#quick-actions-for-issues-merge-requests-and-epics
image_url: https://about.gitlab.com/images/13_8/rebase_comment.png
published_at: 2021-01-22
......@@ -75,7 +75,7 @@
stage: enablement
self-managed: true
gitlab-com: false
packages: [Core, Starter, Premium, Ultimate]
packages: [Free, Premium, Ultimate]
url: https://docs.gitlab.com/charts/charts/gitlab/gitlab-pages/index.html
image_url: https://about.gitlab.com/images/home/kubernetes.png
published_at: 2021-01-22
......
......@@ -5,7 +5,7 @@ module ReleaseHighlights
include ActiveModel::Validations
include ActiveModel::Validations::Callbacks
PACKAGES = %w(Core Starter Premium Ultimate).freeze
PACKAGES = %w(Free Premium Ultimate).freeze
attr_reader :entry
......
......@@ -13,7 +13,7 @@
stage: Release
self-managed: true
gitlab-com: true
packages: [Starter]
packages: [Free]
url: https://docs.gitlab.com/ee/ci/examples/authenticating-with-hashicorp-vault/index.html
image_url: https://about.gitlab.com/images/12_10/jwt-vault-1.png
published_at: 2020-04-22
......
......@@ -13,7 +13,7 @@
stage: Release
self-managed: true
gitlab-com: true
packages: [Starter]
packages: [Free]
url: https://docs.gitlab.com/ee/ci/examples/authenticating-with-hashicorp-vault/index.html
image_url: https://about.gitlab.com/images/12_10/jwt-vault-1.png
published_at: 2020-04-22
......
......@@ -80,7 +80,7 @@ RSpec.describe ReleaseHighlights::Validator::Entry do
subject.valid?
expect(subject.errors[:packages].first).to include("must be one of", "Core", "Starter", "Premium", "Ultimate")
expect(subject.errors[:packages].first).to include("must be one of", "Free", "Premium", "Ultimate")
end
end
end
......
......@@ -70,7 +70,7 @@ RSpec.describe ReleaseHighlights::Validator do
---------------------------------------------------------
Validation failed for spec/fixtures/whats_new/invalid.yml
---------------------------------------------------------
* Packages must be one of ["Core", "Starter", "Premium", "Ultimate"] (line 6)
* Packages must be one of ["Free", "Premium", "Ultimate"] (line 6)
MESSAGE
end
......
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Gitlab::WhatsNew::ItemPresenter do
let(:present) { Gitlab::WhatsNew::ItemPresenter.present(item) }
let(:item) { { "packages" => %w(Core Starter Premium Ultimate) } }
let(:gitlab_com) { true }
before do
allow(Gitlab).to receive(:com?).and_return(gitlab_com)
end
describe '.present' do
context 'when on Gitlab.com' do
it 'transforms package names to gitlab.com friendly package names' do
expect(present).to eq({ "packages" => %w(Free Bronze Silver Gold) })
end
end
context 'when not on Gitlab.com' do
let(:gitlab_com) { false }
it 'does not transform package names' do
expect(present).to eq({ "packages" => %w(Core Starter Premium Ultimate) })
end
end
end
end
......@@ -10,7 +10,6 @@ RSpec.describe WhatsNewController do
context 'with no page param' do
it 'responds with paginated data and headers' do
allow(ReleaseHighlight).to receive(:paginated).with(page: 1).and_return(highlights)
allow(Gitlab::WhatsNew::ItemPresenter).to receive(:present).with(item).and_return(item)
get whats_new_path, xhr: true
......@@ -36,7 +35,6 @@ RSpec.describe WhatsNewController do
context 'with version param' do
it 'returns items without pagination headers' do
allow(ReleaseHighlight).to receive(:for_version).with(version: '42').and_return(highlights)
allow(Gitlab::WhatsNew::ItemPresenter).to receive(:present).with(item).and_return(item)
get whats_new_path(version: 42), xhr: true
......
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