Class: RosettAi::Authorship::ReviewValidator
- Inherits:
-
Object
- Object
- RosettAi::Authorship::ReviewValidator
- Defined in:
- lib/rosett_ai/authorship/review_validator.rb
Overview
Validates that Human-Reviewed-By differs from the commit author.
Self-review (where the submitter is also the reviewer) does not satisfy the review requirement. At advisory level this produces a warning; at strict level it produces an error.
Instance Method Summary collapse
-
#validate(author:, reviewer:) ⇒ Hash
Result of a review validation check.
Instance Method Details
#validate(author:, reviewer:) ⇒ Hash
Result of a review validation check.
17 18 19 20 21 22 |
# File 'lib/rosett_ai/authorship/review_validator.rb', line 17 def validate(author:, reviewer:) return success if .nil? || reviewer.nil? return success unless normalize() == normalize(reviewer) failure('Human-Reviewed-By must differ from the commit author (self-review detected)') end |