From c467dccecb341175c884a3e8591bdba5762c898e Mon Sep 17 00:00:00 2001 From: Artem Yegorov Date: Sun, 13 Oct 2024 19:37:45 +0300 Subject: [PATCH] #102: ignore delete not found issue --- judges/find-all-issues/find-all-issues.rb | 1 - test/judges/test-find-all-issues.rb | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/judges/find-all-issues/find-all-issues.rb b/judges/find-all-issues/find-all-issues.rb index 89bfa68a..1fd91a3b 100644 --- a/judges/find-all-issues/find-all-issues.rb +++ b/judges/find-all-issues/find-all-issues.rb @@ -38,7 +38,6 @@ begin after = Fbe.octo.issue(repo, issue)[:created_at] rescue Octokit::NotFound - Fbe.fb.query("(and (eq where 'github') (eq repository #{repository}) (eq issue #{issue}))").delete! next 0 end Fbe.octo.search_issues("repo:#{repo} type:issue created:<=#{after.iso8601[0..9]}")[:items].each do |json| diff --git a/test/judges/test-find-all-issues.rb b/test/judges/test-find-all-issues.rb index 63529872..69a70e74 100644 --- a/test/judges/test-find-all-issues.rb +++ b/test/judges/test-find-all-issues.rb @@ -87,14 +87,14 @@ def test_find_all_issues_with_not_found_min_issue_in_github end load_it('find-all-issues', fb) fs = fb.query('(always)').each.to_a - assert_equal(1, fs.count) - fs.first.then do |f| + assert_equal(2, fs.count) + fs.last.then do |f| assert_equal('min-issue-was-found', f.what) assert_equal('github', f.where) assert_equal(695, f.repository) assert_equal(0, f.latest) end - assert_empty(fb.query("(eq what 'issue-was-opened')").each.to_a) + refute_empty(fb.query("(eq what 'issue-was-opened')").each.to_a) end def test_find_all_issues