Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
bfe2a24d
Commit
bfe2a24d
authored
Oct 29, 2020
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature categories to the API B -> G
This adds a feature category to API classes from B -> G
parent
d4e08b04
Changes
33
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
75 additions
and
1 deletion
+75
-1
lib/api/badges.rb
lib/api/badges.rb
+2
-0
lib/api/boards.rb
lib/api/boards.rb
+2
-0
lib/api/branches.rb
lib/api/branches.rb
+2
-0
lib/api/broadcast_messages.rb
lib/api/broadcast_messages.rb
+2
-0
lib/api/ci/pipeline_schedules.rb
lib/api/ci/pipeline_schedules.rb
+2
-0
lib/api/ci/pipelines.rb
lib/api/ci/pipelines.rb
+2
-0
lib/api/ci/runner.rb
lib/api/ci/runner.rb
+2
-0
lib/api/ci/runners.rb
lib/api/ci/runners.rb
+2
-0
lib/api/commit_statuses.rb
lib/api/commit_statuses.rb
+2
-0
lib/api/commits.rb
lib/api/commits.rb
+2
-0
lib/api/container_registry_event.rb
lib/api/container_registry_event.rb
+2
-0
lib/api/deploy_keys.rb
lib/api/deploy_keys.rb
+2
-0
lib/api/deploy_tokens.rb
lib/api/deploy_tokens.rb
+2
-0
lib/api/deployments.rb
lib/api/deployments.rb
+2
-0
lib/api/environments.rb
lib/api/environments.rb
+2
-0
lib/api/error_tracking.rb
lib/api/error_tracking.rb
+2
-0
lib/api/events.rb
lib/api/events.rb
+2
-0
lib/api/feature_flag_scopes.rb
lib/api/feature_flag_scopes.rb
+2
-0
lib/api/feature_flags.rb
lib/api/feature_flags.rb
+2
-0
lib/api/feature_flags_user_lists.rb
lib/api/feature_flags_user_lists.rb
+2
-0
lib/api/features.rb
lib/api/features.rb
+2
-0
lib/api/files.rb
lib/api/files.rb
+2
-0
lib/api/freeze_periods.rb
lib/api/freeze_periods.rb
+2
-0
lib/api/group_boards.rb
lib/api/group_boards.rb
+2
-0
lib/api/group_clusters.rb
lib/api/group_clusters.rb
+2
-0
lib/api/group_container_repositories.rb
lib/api/group_container_repositories.rb
+2
-0
lib/api/group_export.rb
lib/api/group_export.rb
+2
-0
lib/api/group_import.rb
lib/api/group_import.rb
+2
-0
lib/api/group_labels.rb
lib/api/group_labels.rb
+2
-0
lib/api/group_milestones.rb
lib/api/group_milestones.rb
+2
-0
lib/api/group_variables.rb
lib/api/group_variables.rb
+2
-0
lib/api/groups.rb
lib/api/groups.rb
+2
-0
spec/lib/api/every_api_endpoint_spec.rb
spec/lib/api/every_api_endpoint_spec.rb
+11
-1
No files found.
lib/api/badges.rb
View file @
bfe2a24d
...
@@ -8,6 +8,8 @@ module API
...
@@ -8,6 +8,8 @@ module API
helpers
::
API
::
Helpers
::
BadgesHelpers
helpers
::
API
::
Helpers
::
BadgesHelpers
feature_category
:continuous_integration
helpers
do
helpers
do
def
find_source_if_admin
(
source_type
)
def
find_source_if_admin
(
source_type
)
source
=
find_source
(
source_type
,
params
[
:id
])
source
=
find_source
(
source_type
,
params
[
:id
])
...
...
lib/api/boards.rb
View file @
bfe2a24d
...
@@ -9,6 +9,8 @@ module API
...
@@ -9,6 +9,8 @@ module API
before
{
authenticate!
}
before
{
authenticate!
}
feature_category
:boards
helpers
do
helpers
do
def
board_parent
def
board_parent
user_project
user_project
...
...
lib/api/branches.rb
View file @
bfe2a24d
...
@@ -10,6 +10,8 @@ module API
...
@@ -10,6 +10,8 @@ module API
after_validation
{
content_type
"application/json"
}
after_validation
{
content_type
"application/json"
}
feature_category
:source_code_management
before
do
before
do
require_repository_enabled!
require_repository_enabled!
authorize!
:download_code
,
user_project
authorize!
:download_code
,
user_project
...
...
lib/api/broadcast_messages.rb
View file @
bfe2a24d
...
@@ -4,6 +4,8 @@ module API
...
@@ -4,6 +4,8 @@ module API
class
BroadcastMessages
<
::
API
::
Base
class
BroadcastMessages
<
::
API
::
Base
include
PaginationParams
include
PaginationParams
feature_category
:navigation
resource
:broadcast_messages
do
resource
:broadcast_messages
do
helpers
do
helpers
do
def
find_message
def
find_message
...
...
lib/api/ci/pipeline_schedules.rb
View file @
bfe2a24d
...
@@ -7,6 +7,8 @@ module API
...
@@ -7,6 +7,8 @@ module API
before
{
authenticate!
}
before
{
authenticate!
}
feature_category
:continuous_integration
params
do
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
end
...
...
lib/api/ci/pipelines.rb
View file @
bfe2a24d
...
@@ -7,6 +7,8 @@ module API
...
@@ -7,6 +7,8 @@ module API
before
{
authenticate_non_get!
}
before
{
authenticate_non_get!
}
feature_category
:continuous_integration
params
do
params
do
requires
:id
,
type:
String
,
desc:
'The project ID'
requires
:id
,
type:
String
,
desc:
'The project ID'
end
end
...
...
lib/api/ci/runner.rb
View file @
bfe2a24d
...
@@ -7,6 +7,8 @@ module API
...
@@ -7,6 +7,8 @@ module API
content_type
:txt
,
'text/plain'
content_type
:txt
,
'text/plain'
feature_category
:continuous_integration
resource
:runners
do
resource
:runners
do
desc
'Registers a new Runner'
do
desc
'Registers a new Runner'
do
success
Entities
::
RunnerRegistrationDetails
success
Entities
::
RunnerRegistrationDetails
...
...
lib/api/ci/runners.rb
View file @
bfe2a24d
...
@@ -7,6 +7,8 @@ module API
...
@@ -7,6 +7,8 @@ module API
before
{
authenticate!
}
before
{
authenticate!
}
feature_category
:continuous_integration
resource
:runners
do
resource
:runners
do
desc
'Get runners available for user'
do
desc
'Get runners available for user'
do
success
Entities
::
Runner
success
Entities
::
Runner
...
...
lib/api/commit_statuses.rb
View file @
bfe2a24d
...
@@ -4,6 +4,8 @@ require 'mime/types'
...
@@ -4,6 +4,8 @@ require 'mime/types'
module
API
module
API
class
CommitStatuses
<
::
API
::
Base
class
CommitStatuses
<
::
API
::
Base
feature_category
:continuous_integration
params
do
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
end
...
...
lib/api/commits.rb
View file @
bfe2a24d
...
@@ -6,6 +6,8 @@ module API
...
@@ -6,6 +6,8 @@ module API
class
Commits
<
::
API
::
Base
class
Commits
<
::
API
::
Base
include
PaginationParams
include
PaginationParams
feature_category
:source_code_management
before
do
before
do
require_repository_enabled!
require_repository_enabled!
authorize!
:download_code
,
user_project
authorize!
:download_code
,
user_project
...
...
lib/api/container_registry_event.rb
View file @
bfe2a24d
...
@@ -4,6 +4,8 @@ module API
...
@@ -4,6 +4,8 @@ module API
class
ContainerRegistryEvent
<
::
API
::
Base
class
ContainerRegistryEvent
<
::
API
::
Base
DOCKER_DISTRIBUTION_EVENTS_V1_JSON
=
'application/vnd.docker.distribution.events.v1+json'
DOCKER_DISTRIBUTION_EVENTS_V1_JSON
=
'application/vnd.docker.distribution.events.v1+json'
feature_category
:package_registry
before
{
authenticate_registry_notification!
}
before
{
authenticate_registry_notification!
}
resource
:container_registry_event
do
resource
:container_registry_event
do
...
...
lib/api/deploy_keys.rb
View file @
bfe2a24d
...
@@ -6,6 +6,8 @@ module API
...
@@ -6,6 +6,8 @@ module API
before
{
authenticate!
}
before
{
authenticate!
}
feature_category
:continuous_delivery
helpers
do
helpers
do
def
add_deploy_keys_project
(
project
,
attrs
=
{})
def
add_deploy_keys_project
(
project
,
attrs
=
{})
project
.
deploy_keys_projects
.
create
(
attrs
)
project
.
deploy_keys_projects
.
create
(
attrs
)
...
...
lib/api/deploy_tokens.rb
View file @
bfe2a24d
...
@@ -4,6 +4,8 @@ module API
...
@@ -4,6 +4,8 @@ module API
class
DeployTokens
<
::
API
::
Base
class
DeployTokens
<
::
API
::
Base
include
PaginationParams
include
PaginationParams
feature_category
:continuous_delivery
helpers
do
helpers
do
def
scope_params
def
scope_params
scopes
=
params
.
delete
(
:scopes
)
scopes
=
params
.
delete
(
:scopes
)
...
...
lib/api/deployments.rb
View file @
bfe2a24d
...
@@ -7,6 +7,8 @@ module API
...
@@ -7,6 +7,8 @@ module API
before
{
authenticate!
}
before
{
authenticate!
}
feature_category
:continuous_delivery
params
do
params
do
requires
:id
,
type:
String
,
desc:
'The project ID'
requires
:id
,
type:
String
,
desc:
'The project ID'
end
end
...
...
lib/api/environments.rb
View file @
bfe2a24d
...
@@ -7,6 +7,8 @@ module API
...
@@ -7,6 +7,8 @@ module API
before
{
authenticate!
}
before
{
authenticate!
}
feature_category
:continuous_delivery
params
do
params
do
requires
:id
,
type:
String
,
desc:
'The project ID'
requires
:id
,
type:
String
,
desc:
'The project ID'
end
end
...
...
lib/api/error_tracking.rb
View file @
bfe2a24d
...
@@ -4,6 +4,8 @@ module API
...
@@ -4,6 +4,8 @@ module API
class
ErrorTracking
<
::
API
::
Base
class
ErrorTracking
<
::
API
::
Base
before
{
authenticate!
}
before
{
authenticate!
}
feature_category
:error_tracking
params
do
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
end
...
...
lib/api/events.rb
View file @
bfe2a24d
...
@@ -8,6 +8,8 @@ module API
...
@@ -8,6 +8,8 @@ module API
allow_access_with_scope
:read_user
,
if:
->
(
request
)
{
request
.
get?
}
allow_access_with_scope
:read_user
,
if:
->
(
request
)
{
request
.
get?
}
feature_category
:users
resource
:events
do
resource
:events
do
desc
"List currently authenticated user's events"
do
desc
"List currently authenticated user's events"
do
detail
'This feature was introduced in GitLab 9.3.'
detail
'This feature was introduced in GitLab 9.3.'
...
...
lib/api/feature_flag_scopes.rb
View file @
bfe2a24d
...
@@ -7,6 +7,8 @@ module API
...
@@ -7,6 +7,8 @@ module API
ENVIRONMENT_SCOPE_ENDPOINT_REQUIREMENTS
=
FeatureFlags
::
FEATURE_FLAG_ENDPOINT_REQUIREMENTS
ENVIRONMENT_SCOPE_ENDPOINT_REQUIREMENTS
=
FeatureFlags
::
FEATURE_FLAG_ENDPOINT_REQUIREMENTS
.
merge
(
environment_scope:
API
::
NO_SLASH_URL_PART_REGEX
)
.
merge
(
environment_scope:
API
::
NO_SLASH_URL_PART_REGEX
)
feature_category
:feature_flags
before
do
before
do
authorize_read_feature_flags!
authorize_read_feature_flags!
end
end
...
...
lib/api/feature_flags.rb
View file @
bfe2a24d
...
@@ -7,6 +7,8 @@ module API
...
@@ -7,6 +7,8 @@ module API
FEATURE_FLAG_ENDPOINT_REQUIREMENTS
=
API
::
NAMESPACE_OR_PROJECT_REQUIREMENTS
FEATURE_FLAG_ENDPOINT_REQUIREMENTS
=
API
::
NAMESPACE_OR_PROJECT_REQUIREMENTS
.
merge
(
name:
API
::
NO_SLASH_URL_PART_REGEX
)
.
merge
(
name:
API
::
NO_SLASH_URL_PART_REGEX
)
feature_category
:feature_flags
before
do
before
do
authorize_read_feature_flags!
authorize_read_feature_flags!
end
end
...
...
lib/api/feature_flags_user_lists.rb
View file @
bfe2a24d
...
@@ -8,6 +8,8 @@ module API
...
@@ -8,6 +8,8 @@ module API
message
.
is_a?
(
String
)
?
{
message:
message
}.
to_json
:
message
.
to_json
message
.
is_a?
(
String
)
?
{
message:
message
}.
to_json
:
message
.
to_json
}
}
feature_category
:feature_flags
before
do
before
do
authorize_admin_feature_flags_user_lists!
authorize_admin_feature_flags_user_lists!
end
end
...
...
lib/api/features.rb
View file @
bfe2a24d
...
@@ -4,6 +4,8 @@ module API
...
@@ -4,6 +4,8 @@ module API
class
Features
<
::
API
::
Base
class
Features
<
::
API
::
Base
before
{
authenticated_as_admin!
}
before
{
authenticated_as_admin!
}
feature_category
:feature_flags
helpers
do
helpers
do
def
gate_value
(
params
)
def
gate_value
(
params
)
case
params
[
:value
]
case
params
[
:value
]
...
...
lib/api/files.rb
View file @
bfe2a24d
...
@@ -9,6 +9,8 @@ module API
...
@@ -9,6 +9,8 @@ module API
# Prevents returning plain/text responses for files with .txt extension
# Prevents returning plain/text responses for files with .txt extension
after_validation
{
content_type
"application/json"
}
after_validation
{
content_type
"application/json"
}
feature_category
:source_code_management
helpers
::
API
::
Helpers
::
HeadersHelpers
helpers
::
API
::
Helpers
::
HeadersHelpers
helpers
do
helpers
do
...
...
lib/api/freeze_periods.rb
View file @
bfe2a24d
...
@@ -6,6 +6,8 @@ module API
...
@@ -6,6 +6,8 @@ module API
before
{
authenticate!
}
before
{
authenticate!
}
feature_category
:continuous_delivery
params
do
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
end
...
...
lib/api/group_boards.rb
View file @
bfe2a24d
...
@@ -7,6 +7,8 @@ module API
...
@@ -7,6 +7,8 @@ module API
prepend_if_ee
(
'EE::API::BoardsResponses'
)
# rubocop: disable Cop/InjectEnterpriseEditionModule
prepend_if_ee
(
'EE::API::BoardsResponses'
)
# rubocop: disable Cop/InjectEnterpriseEditionModule
feature_category
:boards
before
do
before
do
authenticate!
authenticate!
end
end
...
...
lib/api/group_clusters.rb
View file @
bfe2a24d
...
@@ -6,6 +6,8 @@ module API
...
@@ -6,6 +6,8 @@ module API
before
{
authenticate!
}
before
{
authenticate!
}
feature_category
:kubernetes_management
params
do
params
do
requires
:id
,
type:
String
,
desc:
'The ID of the group'
requires
:id
,
type:
String
,
desc:
'The ID of the group'
end
end
...
...
lib/api/group_container_repositories.rb
View file @
bfe2a24d
...
@@ -8,6 +8,8 @@ module API
...
@@ -8,6 +8,8 @@ module API
before
{
authorize_read_group_container_images!
}
before
{
authorize_read_group_container_images!
}
feature_category
:package_registry
REPOSITORY_ENDPOINT_REQUIREMENTS
=
API
::
NAMESPACE_OR_PROJECT_REQUIREMENTS
.
merge
(
REPOSITORY_ENDPOINT_REQUIREMENTS
=
API
::
NAMESPACE_OR_PROJECT_REQUIREMENTS
.
merge
(
tag_name:
API
::
NO_SLASH_URL_PART_REGEX
)
tag_name:
API
::
NO_SLASH_URL_PART_REGEX
)
...
...
lib/api/group_export.rb
View file @
bfe2a24d
...
@@ -10,6 +10,8 @@ module API
...
@@ -10,6 +10,8 @@ module API
authorize!
:admin_group
,
user_group
authorize!
:admin_group
,
user_group
end
end
feature_category
:importers
params
do
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a group'
requires
:id
,
type:
String
,
desc:
'The ID of a group'
end
end
...
...
lib/api/group_import.rb
View file @
bfe2a24d
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
module
API
module
API
class
GroupImport
<
::
API
::
Base
class
GroupImport
<
::
API
::
Base
feature_category
:importers
helpers
Helpers
::
FileUploadHelpers
helpers
Helpers
::
FileUploadHelpers
helpers
do
helpers
do
...
...
lib/api/group_labels.rb
View file @
bfe2a24d
...
@@ -7,6 +7,8 @@ module API
...
@@ -7,6 +7,8 @@ module API
before
{
authenticate!
}
before
{
authenticate!
}
feature_category
:issue_tracking
params
do
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a group'
requires
:id
,
type:
String
,
desc:
'The ID of a group'
end
end
...
...
lib/api/group_milestones.rb
View file @
bfe2a24d
...
@@ -7,6 +7,8 @@ module API
...
@@ -7,6 +7,8 @@ module API
before
{
authenticate!
}
before
{
authenticate!
}
feature_category
:issue_tracking
params
do
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a group'
requires
:id
,
type:
String
,
desc:
'The ID of a group'
end
end
...
...
lib/api/group_variables.rb
View file @
bfe2a24d
...
@@ -7,6 +7,8 @@ module API
...
@@ -7,6 +7,8 @@ module API
before
{
authenticate!
}
before
{
authenticate!
}
before
{
authorize!
:admin_build
,
user_group
}
before
{
authorize!
:admin_build
,
user_group
}
feature_category
:continuous_integration
params
do
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a group'
requires
:id
,
type:
String
,
desc:
'The ID of a group'
end
end
...
...
lib/api/groups.rb
View file @
bfe2a24d
...
@@ -7,6 +7,8 @@ module API
...
@@ -7,6 +7,8 @@ module API
before
{
authenticate_non_get!
}
before
{
authenticate_non_get!
}
feature_category
:subgroups
helpers
Helpers
::
GroupsHelpers
helpers
Helpers
::
GroupsHelpers
helpers
do
helpers
do
...
...
spec/lib/api/every_api_endpoint_spec.rb
View file @
bfe2a24d
...
@@ -22,7 +22,17 @@ RSpec.describe 'Every API endpoint' do
...
@@ -22,7 +22,17 @@ RSpec.describe 'Every API endpoint' do
completed_classes
=
[
completed_classes
=
[
::
API
::
Users
,
::
API
::
Issues
,
::
API
::
AccessRequests
,
::
API
::
Admin
::
Ci
::
Variables
,
::
API
::
Users
,
::
API
::
Issues
,
::
API
::
AccessRequests
,
::
API
::
Admin
::
Ci
::
Variables
,
::
API
::
Admin
::
InstanceClusters
,
::
API
::
Admin
::
Sidekiq
,
::
API
::
Appearance
,
::
API
::
Admin
::
InstanceClusters
,
::
API
::
Admin
::
Sidekiq
,
::
API
::
Appearance
,
::
API
::
Applications
,
::
API
::
Avatar
,
::
API
::
AwardEmoji
::
API
::
Applications
,
::
API
::
Avatar
,
::
API
::
AwardEmoji
,
API
::
Badges
,
::
API
::
Boards
,
::
API
::
Branches
,
::
API
::
BroadcastMessages
,
::
API
::
Ci
::
Pipelines
,
::
API
::
Ci
::
PipelineSchedules
,
::
API
::
Ci
::
Runners
,
::
API
::
Ci
::
Runner
,
::
API
::
Commits
,
::
API
::
CommitStatuses
,
::
API
::
ContainerRegistryEvent
,
::
API
::
DeployKeys
,
::
API
::
DeployTokens
,
::
API
::
Deployments
,
::
API
::
Environments
,
::
API
::
ErrorTracking
,
::
API
::
Events
,
::
API
::
FeatureFlags
,
::
API
::
FeatureFlagScopes
,
::
API
::
FeatureFlagsUserLists
,
::
API
::
Features
,
::
API
::
Files
,
::
API
::
FreezePeriods
,
::
API
::
GroupBoards
,
::
API
::
GroupClusters
,
::
API
::
GroupExport
,
::
API
::
GroupImport
,
::
API
::
GroupLabels
,
::
API
::
GroupMilestones
,
::
API
::
Groups
,
::
API
::
GroupContainerRepositories
,
::
API
::
GroupVariables
]
]
next
unless
completed_classes
.
include?
(
klass
)
next
unless
completed_classes
.
include?
(
klass
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment