Skip to content
Snippets Groups Projects
Commit bfe2a24d authored by Bob Van Landuyt's avatar Bob Van Landuyt
Browse files

Add feature categories to the API B -> G

This adds a feature category to API classes from B -> G
parent d4e08b04
No related branches found
No related tags found
No related merge requests found
Showing
with 40 additions and 0 deletions
Loading
Loading
@@ -8,6 +8,8 @@ class Badges < ::API::Base
 
helpers ::API::Helpers::BadgesHelpers
 
feature_category :continuous_integration
helpers do
def find_source_if_admin(source_type)
source = find_source(source_type, params[:id])
Loading
Loading
Loading
Loading
@@ -9,6 +9,8 @@ class Boards < ::API::Base
 
before { authenticate! }
 
feature_category :boards
helpers do
def board_parent
user_project
Loading
Loading
Loading
Loading
@@ -10,6 +10,8 @@ class Branches < ::API::Base
 
after_validation { content_type "application/json" }
 
feature_category :source_code_management
before do
require_repository_enabled!
authorize! :download_code, user_project
Loading
Loading
Loading
Loading
@@ -4,6 +4,8 @@ module API
class BroadcastMessages < ::API::Base
include PaginationParams
 
feature_category :navigation
resource :broadcast_messages do
helpers do
def find_message
Loading
Loading
Loading
Loading
@@ -7,6 +7,8 @@ class PipelineSchedules < ::API::Base
 
before { authenticate! }
 
feature_category :continuous_integration
params do
requires :id, type: String, desc: 'The ID of a project'
end
Loading
Loading
Loading
Loading
@@ -7,6 +7,8 @@ class Pipelines < ::API::Base
 
before { authenticate_non_get! }
 
feature_category :continuous_integration
params do
requires :id, type: String, desc: 'The project ID'
end
Loading
Loading
Loading
Loading
@@ -7,6 +7,8 @@ class Runner < ::API::Base
 
content_type :txt, 'text/plain'
 
feature_category :continuous_integration
resource :runners do
desc 'Registers a new Runner' do
success Entities::RunnerRegistrationDetails
Loading
Loading
Loading
Loading
@@ -7,6 +7,8 @@ class Runners < ::API::Base
 
before { authenticate! }
 
feature_category :continuous_integration
resource :runners do
desc 'Get runners available for user' do
success Entities::Runner
Loading
Loading
Loading
Loading
@@ -4,6 +4,8 @@
 
module API
class CommitStatuses < ::API::Base
feature_category :continuous_integration
params do
requires :id, type: String, desc: 'The ID of a project'
end
Loading
Loading
Loading
Loading
@@ -6,6 +6,8 @@ module API
class Commits < ::API::Base
include PaginationParams
 
feature_category :source_code_management
before do
require_repository_enabled!
authorize! :download_code, user_project
Loading
Loading
Loading
Loading
@@ -4,6 +4,8 @@ module API
class ContainerRegistryEvent < ::API::Base
DOCKER_DISTRIBUTION_EVENTS_V1_JSON = 'application/vnd.docker.distribution.events.v1+json'
 
feature_category :package_registry
before { authenticate_registry_notification! }
 
resource :container_registry_event do
Loading
Loading
Loading
Loading
@@ -6,6 +6,8 @@ class DeployKeys < ::API::Base
 
before { authenticate! }
 
feature_category :continuous_delivery
helpers do
def add_deploy_keys_project(project, attrs = {})
project.deploy_keys_projects.create(attrs)
Loading
Loading
Loading
Loading
@@ -4,6 +4,8 @@ module API
class DeployTokens < ::API::Base
include PaginationParams
 
feature_category :continuous_delivery
helpers do
def scope_params
scopes = params.delete(:scopes)
Loading
Loading
Loading
Loading
@@ -7,6 +7,8 @@ class Deployments < ::API::Base
 
before { authenticate! }
 
feature_category :continuous_delivery
params do
requires :id, type: String, desc: 'The project ID'
end
Loading
Loading
Loading
Loading
@@ -7,6 +7,8 @@ class Environments < ::API::Base
 
before { authenticate! }
 
feature_category :continuous_delivery
params do
requires :id, type: String, desc: 'The project ID'
end
Loading
Loading
Loading
Loading
@@ -4,6 +4,8 @@ module API
class ErrorTracking < ::API::Base
before { authenticate! }
 
feature_category :error_tracking
params do
requires :id, type: String, desc: 'The ID of a project'
end
Loading
Loading
Loading
Loading
@@ -8,6 +8,8 @@ class Events < ::API::Base
 
allow_access_with_scope :read_user, if: -> (request) { request.get? }
 
feature_category :users
resource :events do
desc "List currently authenticated user's events" do
detail 'This feature was introduced in GitLab 9.3.'
Loading
Loading
Loading
Loading
@@ -7,6 +7,8 @@ class FeatureFlagScopes < ::API::Base
ENVIRONMENT_SCOPE_ENDPOINT_REQUIREMENTS = FeatureFlags::FEATURE_FLAG_ENDPOINT_REQUIREMENTS
.merge(environment_scope: API::NO_SLASH_URL_PART_REGEX)
 
feature_category :feature_flags
before do
authorize_read_feature_flags!
end
Loading
Loading
Loading
Loading
@@ -7,6 +7,8 @@ class FeatureFlags < ::API::Base
FEATURE_FLAG_ENDPOINT_REQUIREMENTS = API::NAMESPACE_OR_PROJECT_REQUIREMENTS
.merge(name: API::NO_SLASH_URL_PART_REGEX)
 
feature_category :feature_flags
before do
authorize_read_feature_flags!
end
Loading
Loading
Loading
Loading
@@ -8,6 +8,8 @@ class FeatureFlagsUserLists < ::API::Base
message.is_a?(String) ? { message: message }.to_json : message.to_json
}
 
feature_category :feature_flags
before do
authorize_admin_feature_flags_user_lists!
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment