BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
6a2ee096
Commit
6a2ee096
authored
Aug 31, 2017
by
Robert Schilling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API: Use defined project requirements
parent
a768e1b7
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
35 additions
and
35 deletions
+35
-35
access_requests.rb
lib/api/access_requests.rb
+1
-1
award_emoji.rb
lib/api/award_emoji.rb
+1
-1
boards.rb
lib/api/boards.rb
+1
-1
commit_statuses.rb
lib/api/commit_statuses.rb
+1
-1
deploy_keys.rb
lib/api/deploy_keys.rb
+1
-1
deployments.rb
lib/api/deployments.rb
+1
-1
environments.rb
lib/api/environments.rb
+1
-1
events.rb
lib/api/events.rb
+1
-1
group_milestones.rb
lib/api/group_milestones.rb
+1
-1
group_variables.rb
lib/api/group_variables.rb
+1
-1
groups.rb
lib/api/groups.rb
+1
-1
issues.rb
lib/api/issues.rb
+2
-2
jobs.rb
lib/api/jobs.rb
+1
-1
labels.rb
lib/api/labels.rb
+1
-1
members.rb
lib/api/members.rb
+1
-1
merge_request_diffs.rb
lib/api/merge_request_diffs.rb
+1
-1
merge_requests.rb
lib/api/merge_requests.rb
+1
-1
notes.rb
lib/api/notes.rb
+1
-1
notification_settings.rb
lib/api/notification_settings.rb
+1
-1
pipeline_schedules.rb
lib/api/pipeline_schedules.rb
+1
-1
pipelines.rb
lib/api/pipelines.rb
+1
-1
project_hooks.rb
lib/api/project_hooks.rb
+1
-1
project_milestones.rb
lib/api/project_milestones.rb
+1
-1
project_snippets.rb
lib/api/project_snippets.rb
+1
-1
projects.rb
lib/api/projects.rb
+2
-2
repositories.rb
lib/api/repositories.rb
+1
-1
runners.rb
lib/api/runners.rb
+1
-1
services.rb
lib/api/services.rb
+2
-2
subscriptions.rb
lib/api/subscriptions.rb
+1
-1
todos.rb
lib/api/todos.rb
+1
-1
triggers.rb
lib/api/triggers.rb
+1
-1
variables.rb
lib/api/variables.rb
+1
-1
No files found.
lib/api/access_requests.rb
View file @
6a2ee096
...
...
@@ -10,7 +10,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
"The
#{
source_type
}
ID"
end
resource
source_type
.
pluralize
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
source_type
.
pluralize
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
"Gets a list of access requests for a
#{
source_type
}
."
do
detail
'This feature was introduced in GitLab 8.11.'
success
Entities
::
AccessRequester
...
...
lib/api/award_emoji.rb
View file @
6a2ee096
...
...
@@ -12,7 +12,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
AWARDABLES
.
each
do
|
awardable_params
|
awardable_string
=
awardable_params
[
:type
].
pluralize
awardable_id_string
=
"
#{
awardable_params
[
:type
]
}
_
#{
awardable_params
[
:find_by
]
}
"
...
...
lib/api/boards.rb
View file @
6a2ee096
...
...
@@ -7,7 +7,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Get all project boards'
do
detail
'This feature was introduced in 8.13'
success
Entities
::
Board
...
...
lib/api/commit_statuses.rb
View file @
6a2ee096
...
...
@@ -5,7 +5,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
include
PaginationParams
before
{
authenticate!
}
...
...
lib/api/deploy_keys.rb
View file @
6a2ee096
...
...
@@ -17,7 +17,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of the project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
before
{
authorize_admin_project
}
desc
"Get a specific project's deploy keys"
do
...
...
lib/api/deployments.rb
View file @
6a2ee096
...
...
@@ -8,7 +8,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The project ID'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Get all deployments of the project'
do
detail
'This feature was introduced in GitLab 8.11.'
success
Entities
::
Deployment
...
...
lib/api/environments.rb
View file @
6a2ee096
...
...
@@ -9,7 +9,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The project ID'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Get all environments of the project'
do
detail
'This feature was introduced in GitLab 8.11.'
success
Entities
::
Environment
...
...
lib/api/events.rb
View file @
6a2ee096
...
...
@@ -67,7 +67,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
"List a Project's visible events"
do
success
Entities
::
Event
end
...
...
lib/api/group_milestones.rb
View file @
6a2ee096
...
...
@@ -10,7 +10,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a group'
end
resource
:groups
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:groups
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Get a list of group milestones'
do
success
Entities
::
Milestone
end
...
...
lib/api/group_variables.rb
View file @
6a2ee096
...
...
@@ -9,7 +9,7 @@ module API
requires
:id
,
type:
String
,
desc:
'The ID of a group'
end
resource
:groups
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:groups
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Get group-level variables'
do
success
Entities
::
Variable
end
...
...
lib/api/groups.rb
View file @
6a2ee096
...
...
@@ -89,7 +89,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a group'
end
resource
:groups
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:groups
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Update a group. Available only for users who can administrate groups.'
do
success
Entities
::
Group
end
...
...
lib/api/issues.rb
View file @
6a2ee096
...
...
@@ -81,7 +81,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a group'
end
resource
:groups
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:groups
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Get a list of group issues'
do
success
Entities
::
IssueBasic
end
...
...
@@ -108,7 +108,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
include
TimeTrackingEndpoints
desc
'Get a list of project issues'
do
...
...
lib/api/jobs.rb
View file @
6a2ee096
...
...
@@ -7,7 +7,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
helpers
do
params
:optional_scope
do
optional
:scope
,
types:
[
String
,
Array
[
String
]],
desc:
'The scope of builds to show'
,
...
...
lib/api/labels.rb
View file @
6a2ee096
...
...
@@ -7,7 +7,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Get all labels of the project'
do
success
Entities
::
Label
end
...
...
lib/api/members.rb
View file @
6a2ee096
...
...
@@ -10,7 +10,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
"The
#{
source_type
}
ID"
end
resource
source_type
.
pluralize
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
source_type
.
pluralize
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Gets a list of group or project members viewable by the authenticated user.'
do
success
Entities
::
Member
end
...
...
lib/api/merge_request_diffs.rb
View file @
6a2ee096
...
...
@@ -8,7 +8,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Get a list of merge request diff versions'
do
detail
'This feature was introduced in GitLab 8.12.'
success
Entities
::
MergeRequestDiff
...
...
lib/api/merge_requests.rb
View file @
6a2ee096
...
...
@@ -72,7 +72,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
include
TimeTrackingEndpoints
helpers
do
...
...
lib/api/notes.rb
View file @
6a2ee096
...
...
@@ -9,7 +9,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
NOTEABLE_TYPES
.
each
do
|
noteable_type
|
noteables_str
=
noteable_type
.
to_s
.
underscore
.
pluralize
...
...
lib/api/notification_settings.rb
View file @
6a2ee096
...
...
@@ -54,7 +54,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
"The
#{
source_type
}
ID"
end
resource
source_type
.
pluralize
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
source_type
.
pluralize
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
"Get
#{
source_type
}
level notification level settings, defaults to Global"
do
detail
'This feature was introduced in GitLab 8.12'
success
Entities
::
NotificationSetting
...
...
lib/api/pipeline_schedules.rb
View file @
6a2ee096
...
...
@@ -7,7 +7,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Get all pipeline schedules'
do
success
Entities
::
PipelineSchedule
end
...
...
lib/api/pipelines.rb
View file @
6a2ee096
...
...
@@ -7,7 +7,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The project ID'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Get all Pipelines of the project'
do
detail
'This feature was introduced in GitLab 8.11.'
success
Entities
::
PipelineBasic
...
...
lib/api/project_hooks.rb
View file @
6a2ee096
...
...
@@ -24,7 +24,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Get project hooks'
do
success
Entities
::
ProjectHook
end
...
...
lib/api/project_milestones.rb
View file @
6a2ee096
...
...
@@ -10,7 +10,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Get a list of project milestones'
do
success
Entities
::
Milestone
end
...
...
lib/api/project_snippets.rb
View file @
6a2ee096
...
...
@@ -7,7 +7,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
helpers
do
def
handle_project_member_errors
(
errors
)
if
errors
[
:project_access
].
any?
...
...
lib/api/projects.rb
View file @
6a2ee096
...
...
@@ -95,7 +95,7 @@ module API
end
end
resource
:users
,
requirements:
{
user_id:
%r{[^/]+}
}
do
resource
:users
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Get a user projects'
do
success
Entities
::
BasicProjectDetails
end
...
...
@@ -183,7 +183,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Get a single project'
do
success
Entities
::
ProjectWithAccess
end
...
...
lib/api/repositories.rb
View file @
6a2ee096
...
...
@@ -9,7 +9,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
helpers
do
def
handle_project_member_errors
(
errors
)
if
errors
[
:project_access
].
any?
...
...
lib/api/runners.rb
View file @
6a2ee096
...
...
@@ -87,7 +87,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
before
{
authorize_admin_project
}
desc
'Get runners available for project'
do
...
...
lib/api/services.rb
View file @
6a2ee096
...
...
@@ -601,7 +601,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
before
{
authenticate!
}
before
{
authorize_admin_project
}
...
...
@@ -691,7 +691,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
"Trigger a slash command for
#{
service_slug
}
"
do
detail
'Added in GitLab 8.13'
end
...
...
lib/api/subscriptions.rb
View file @
6a2ee096
...
...
@@ -12,7 +12,7 @@ module API
requires
:id
,
type:
String
,
desc:
'The ID of a project'
requires
:subscribable_id
,
type:
String
,
desc:
'The ID of a resource'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
subscribable_types
.
each
do
|
type
,
finder
|
type_singularized
=
type
.
singularize
entity_class
=
Entities
.
const_get
(
type_singularized
.
camelcase
)
...
...
lib/api/todos.rb
View file @
6a2ee096
...
...
@@ -12,7 +12,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
ISSUABLE_TYPES
.
each
do
|
type
,
finder
|
type_id_str
=
"
#{
type
.
singularize
}
_iid"
.
to_sym
...
...
lib/api/triggers.rb
View file @
6a2ee096
...
...
@@ -5,7 +5,7 @@ module API
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Trigger a GitLab project pipeline'
do
success
Entities
::
Pipeline
end
...
...
lib/api/variables.rb
View file @
6a2ee096
...
...
@@ -9,7 +9,7 @@ module API
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
resource
:projects
,
requirements:
{
id:
%r{[^/]+}
}
do
resource
:projects
,
requirements:
API
::
PROJECT_ENDPOINT_REQUIREMENTS
do
desc
'Get project variables'
do
success
Entities
::
Variable
end
...
...
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