Commit 7e41d6c1 authored by Mikołaj Wawrzyniak's avatar Mikołaj Wawrzyniak

Merge branch 'nfriend-remove-group_level_release_statistics-feature-flag' into 'master'

Remove group_level_release_statistics feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!61806
parents ce0dbf65 83ff17c7
......@@ -9350,8 +9350,8 @@ Contains release-related statistics about a group.
| Name | Type | Description |
| ---- | ---- | ----------- |
| <a id="groupreleasestatsreleasescount"></a>`releasesCount` | [`Int`](#int) | Total number of releases in all descendant projects of the group. Will always return `null` if `group_level_release_statistics` feature flag is disabled. |
| <a id="groupreleasestatsreleasespercentage"></a>`releasesPercentage` | [`Int`](#int) | Percentage of the group's descendant projects that have at least one release. Will always return `null` if `group_level_release_statistics` feature flag is disabled. |
| <a id="groupreleasestatsreleasescount"></a>`releasesCount` | [`Int`](#int) | Total number of releases in all descendant projects of the group. |
| <a id="groupreleasestatsreleasespercentage"></a>`releasesPercentage` | [`Int`](#int) | Percentage of the group's descendant projects that have at least one release. |
### `GroupStats`
......
......@@ -8,19 +8,17 @@ module Types
authorize :read_group_release_stats
field :releases_count, GraphQL::INT_TYPE, null: true,
description: 'Total number of releases in all descendant projects of the group. ' \
'Will always return `null` if `group_level_release_statistics` feature flag is disabled'
description: 'Total number of releases in all descendant projects of the group.'
def releases_count
object.releases_count if Feature.enabled?(:group_level_release_statistics, object, default_enabled: true)
object.releases_count
end
field :releases_percentage, GraphQL::INT_TYPE, null: true,
description: "Percentage of the group's descendant projects that have at least one release. " \
'Will always return `null` if `group_level_release_statistics` feature flag is disabled'
description: "Percentage of the group's descendant projects that have at least one release."
def releases_percentage
object.releases_percentage if Feature.enabled?(:group_level_release_statistics, object, default_enabled: true)
object.releases_percentage
end
end
end
---
title: Remove group_level_release_statistics flag
merge_request: 61806
author:
type: other
---
name: group_level_release_statistics
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/47245
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/283962
milestone: '13.6'
type: development
group: group::release
default_enabled: true
......@@ -249,8 +249,6 @@ RSpec.describe 'getting group information' do
QUERY
end
let(:group_level_release_statistics) { true }
let(:query) do
graphql_query_for('group', { 'fullPath' => group.full_path }, query_fields)
end
......@@ -260,8 +258,6 @@ RSpec.describe 'getting group information' do
end
before do
stub_feature_flags(group_level_release_statistics: group_level_release_statistics)
group.add_guest(guest_user)
post_graphql(query, current_user: current_user)
......@@ -334,20 +330,6 @@ RSpec.describe 'getting group information' do
it_behaves_like 'correct access to release statistics'
end
context 'when the group_level_release_statistics feature flag is disabled' do
let_it_be(:group) { create(:group, :public) }
let(:current_user) { guest_user }
let(:group_level_release_statistics) { false }
it 'returns null for both statistics' do
expect(release_stats).to match(
releasesCount: nil,
releasesPercentage: nil
)
end
end
end
end
......
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