Skip to content

Commit

Permalink
zerocracy#102: ignore delete not found issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Yegorov committed Oct 13, 2024
1 parent 73d2361 commit c467dcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion judges/find-all-issues/find-all-issues.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
6 changes: 3 additions & 3 deletions test/judges/test-find-all-issues.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c467dcc

Please sign in to comment.