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
ce2c2131
Commit
ce2c2131
authored
Mar 17, 2020
by
Rajendra Kadam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add entities files
parent
fed5327f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
0 deletions
+63
-0
ee/lib/ee/api/entities/merge_request_approval_setting_rule.rb
...ib/ee/api/entities/merge_request_approval_setting_rule.rb
+15
-0
ee/lib/ee/api/entities/merge_request_approval_settings.rb
ee/lib/ee/api/entities/merge_request_approval_settings.rb
+15
-0
ee/lib/ee/api/entities/project_approval_setting_rule.rb
ee/lib/ee/api/entities/project_approval_setting_rule.rb
+15
-0
ee/lib/ee/api/entities/project_approval_settings.rb
ee/lib/ee/api/entities/project_approval_settings.rb
+18
-0
No files found.
ee/lib/ee/api/entities/merge_request_approval_setting_rule.rb
0 → 100644
View file @
ce2c2131
# frozen_string_literal: true
module
EE
module
API
module
Entities
# Being used in private MR-level approvals API.
# This overrides the `eligible_approvers` to be exposed as `approvers`.
#
# To be removed in https://gitlab.com/gitlab-org/gitlab/issues/13574.
class
MergeRequestApprovalSettingRule
<
MergeRequestApprovalStateRule
expose
:approvers
,
using:
::
API
::
Entities
::
UserBasic
,
override:
true
end
end
end
end
ee/lib/ee/api/entities/merge_request_approval_settings.rb
0 → 100644
View file @
ce2c2131
# frozen_string_literal: true
module
EE
module
API
module
Entities
# Being used in private MR-level approvals API.
# This overrides the `rules` to be exposed using MergeRequestApprovalSettingRule.
#
# To be removed in https://gitlab.com/gitlab-org/gitlab/issues/13574.
class
MergeRequestApprovalSettings
<
MergeRequestApprovalState
expose
:wrapped_approval_rules
,
as: :rules
,
using:
MergeRequestApprovalSettingRule
,
override:
true
end
end
end
end
ee/lib/ee/api/entities/project_approval_setting_rule.rb
0 → 100644
View file @
ce2c2131
# frozen_string_literal: true
module
EE
module
API
module
Entities
# Being used in private project-level approvals API.
# This overrides the `eligible_approvers` to be exposed as `approvers`.
#
# To be removed in https://gitlab.com/gitlab-org/gitlab/issues/13574.
class
ProjectApprovalSettingRule
<
ProjectApprovalRule
expose
:approvers
,
using:
::
API
::
Entities
::
UserBasic
,
override:
true
end
end
end
end
ee/lib/ee/api/entities/project_approval_settings.rb
0 → 100644
View file @
ce2c2131
# frozen_string_literal: true
module
EE
module
API
module
Entities
# Being used in private project-level approvals API.
#
# To be removed in https://gitlab.com/gitlab-org/gitlab/issues/13574.
class
ProjectApprovalSettings
<
Grape
::
Entity
expose
:rules
,
using:
ProjectApprovalSettingRule
do
|
project
,
options
|
project
.
visible_approval_rules
(
target_branch:
options
[
:target_branch
])
end
expose
:min_fallback_approvals
,
as: :fallback_approvals_required
end
end
end
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