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
0bd10e9c
Commit
0bd10e9c
authored
Jun 18, 2020
by
Patrick Bajao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add explanation about ApprovalWrappedRule
Adds a comment to explain why we need `ApprovalWrappedRule`.
parent
7c438548
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
ee/app/models/approval_wrapped_rule.rb
ee/app/models/approval_wrapped_rule.rb
+14
-1
No files found.
ee/app/models/approval_wrapped_rule.rb
View file @
0bd10e9c
# frozen_string_literal: true
# A common state computation interface to wrap around ApprovalRuleLike models
# A common state computation interface to wrap around ApprovalRuleLike models.
#
# There are 2 types of approval rules (`ApprovalProjectRule` and
# `ApprovalMergeRequestRule`), we want to get the data we need for the approval
# state of each rule via a common interface. That depends on the approvals data
# of a merge request.
#
# `ApprovalProjectRule` doesn't have access to the merge request unlike
# `ApprovalMergeRequestRule`. Given that, instead of having different checks and
# methods when dealing with a `ApprovalProjectRule`, having a comon interface
# is easier and simpler to interact with.
#
# Different types of `ApprovalWrappedRule` also helps since we have different
# `rule_type`s that can behave differently.
class
ApprovalWrappedRule
extend
Forwardable
include
Gitlab
::
Utils
::
StrongMemoize
...
...
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