diff options
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/entities/project.rb | 1 | ||||
-rw-r--r-- | lib/api/environments.rb | 15 | ||||
-rw-r--r-- | lib/api/metrics/user_starred_dashboards.rb | 4 |
3 files changed, 4 insertions, 16 deletions
diff --git a/lib/api/entities/project.rb b/lib/api/entities/project.rb index 06e636d0301..61feacd6586 100644 --- a/lib/api/entities/project.rb +++ b/lib/api/entities/project.rb @@ -112,7 +112,6 @@ module API expose :ci_forward_deployment_enabled, documentation: { type: 'boolean' } expose(:ci_job_token_scope_enabled, documentation: { type: 'boolean' }) { |p, _| p.ci_outbound_job_token_scope_enabled? } expose :ci_separated_caches, documentation: { type: 'boolean' } - expose :ci_opt_in_jwt, documentation: { type: 'boolean' } expose :ci_allow_fork_pipelines_to_run_in_parent_project, documentation: { type: 'boolean' } expose :build_git_strategy, documentation: { type: 'string', example: 'fetch' } do |project, options| project.build_allow_git_fetch ? 'fetch' : 'clone' diff --git a/lib/api/environments.rb b/lib/api/environments.rb index 24339a1fe30..bb261079d2a 100644 --- a/lib/api/environments.rb +++ b/lib/api/environments.rb @@ -13,13 +13,6 @@ module API urgency :low MIN_SEARCH_LENGTH = 3 - # rubocop:disable Gitlab/DocUrl - ENVIRONMENT_NAME_UPDATE_ERROR = <<~DESC - Updating environment name was deprecated in GitLab 15.9 and to be removed in GitLab 16.0. - For workaround, see [the documentation](https://docs.gitlab.com/ee/ci/environments/#rename-an-environment). - For more information, see [this issue](https://gitlab.com/gitlab-org/gitlab/-/issues/338897) - DESC - # rubocop:enable Gitlab/DocUrl params do requires :id, types: [String, Integer], desc: 'The ID or URL-encoded path of the project owned by the authenticated user' @@ -108,16 +101,8 @@ module API update_params = declared_params(include_missing: false).extract!(:external_url, :tier) - # For the transition period, we implicitly extract `:name` field. - # This line should be removed when disallow_environment_name_update feature flag is removed. - update_params[:name] = params[:name] if params[:name].present? - environment.assign_attributes(update_params) - if environment.name_changed? && ::Feature.enabled?(:disallow_environment_name_update, user_project) - render_api_error!(ENVIRONMENT_NAME_UPDATE_ERROR, 400) - end - if environment.save present environment, with: Entities::Environment, current_user: current_user else diff --git a/lib/api/metrics/user_starred_dashboards.rb b/lib/api/metrics/user_starred_dashboards.rb index 0a91e914d52..b7fba2b6459 100644 --- a/lib/api/metrics/user_starred_dashboards.rb +++ b/lib/api/metrics/user_starred_dashboards.rb @@ -25,6 +25,8 @@ module API end post ':id/metrics/user_starred_dashboards' do + not_found! if Feature.enabled?(:remove_monitor_metrics) + result = ::Metrics::UsersStarredDashboards::CreateService.new(current_user, user_project, params[:dashboard_path]).execute if result.success? @@ -50,6 +52,8 @@ module API end delete ':id/metrics/user_starred_dashboards' do + not_found! if Feature.enabled?(:remove_monitor_metrics) + result = ::Metrics::UsersStarredDashboards::DeleteService.new(current_user, user_project, params[:dashboard_path]).execute if result.success? |