From 363c2e4b43e389ff351efe3698dd78e4a718ec9d Mon Sep 17 00:00:00 2001 From: Artem Yegorov Date: Thu, 5 Sep 2024 21:52:51 +0300 Subject: [PATCH] judges-action#191: add review_comments to Fbe::FakeOctokit --- lib/fbe/octo.rb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/lib/fbe/octo.rb b/lib/fbe/octo.rb index a10e098..1cc0bb2 100644 --- a/lib/fbe/octo.rb +++ b/lib/fbe/octo.rb @@ -320,6 +320,35 @@ def pull_request_reviews(_repo, _number) ] end + def review_comments(_repo, _number) + [ + { + pull_request_review_id: 22_687_249, + id: 17_361_949, + body: 'Some comment 1', + user: { login: 'yegor256', id: 526_301, type: 'User' }, + created_at: Time.parse('2024-09-05 15:31:06 UTC'), + updated_at: Time.parse('2024-09-05 15:33:04 UTC') + }, + { + pull_request_review_id: 22_687_503, + id: 17_361_950, + body: 'Some comment 2', + user: { login: 'yegor256', id: 526_301, type: 'User' }, + created_at: Time.parse('2024-09-06 14:20:00 UTC'), + updated_at: Time.parse('2024-09-06 14:20:50 UTC') + }, + { + pull_request_review_id: 22_687_255, + id: 17_361_970, + body: 'Some comment 3', + user: { login: 'yegor256', id: 526_301, type: 'User' }, + created_at: Time.parse('2024-09-06 20:45:30 UTC'), + updated_at: Time.parse('2024-09-06 20:45:30 UTC') + } + ] + end + def add_comment(_repo, _issue, _text) { id: 42