Class: CleoQualityReview::GitHubReviewPublisher
- Inherits:
-
Object
- Object
- CleoQualityReview::GitHubReviewPublisher
- Defined in:
- lib/cleo_quality_review/github_review_publisher.rb
Overview
Publishes quality review findings as a GitHub pull request review
Defined Under Namespace
Classes: GitHubResponse
Constant Summary collapse
- API_VERSION =
"2022-11-28"
Instance Method Summary collapse
-
#initialize(run:, rendered_review:, env: ENV) ⇒ GitHubReviewPublisher
constructor
A new instance of GitHubReviewPublisher.
-
#publish ⇒ String
Publish the review, or skip when there is no PR context/findings.
Constructor Details
#initialize(run:, rendered_review:, env: ENV) ⇒ GitHubReviewPublisher
Returns a new instance of GitHubReviewPublisher.
20 21 22 23 24 |
# File 'lib/cleo_quality_review/github_review_publisher.rb', line 20 def initialize(run:, rendered_review:, env: ENV) @run = run @rendered_review = rendered_review @env = env end |
Instance Method Details
#publish ⇒ String
Publish the review, or skip when there is no PR context/findings
29 30 31 32 33 34 |
# File 'lib/cleo_quality_review/github_review_publisher.rb', line 29 def publish skip_reason = publication_skip_reason return skip_reason if skip_reason post_review end |