Skip to content

Commit

Permalink
delete invalid compats
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmeurer committed Mar 27, 2024
1 parent 178efa7 commit 06eb455
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/services/compats/check_unchecked.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ def call

next if check_failed?(compat)

if Date.current > Date.new(2024, 6, 1)
ReportError.call "remove this!"
end
if compat.invalid?
compats = Compat.where(dependencies: compat.dependencies)
if compats.size == RailsRelease.count && !compats.include?(compat)
compat.destroy
next
end
end

begin
Compats::Check.call compat
rescue Compats::Check::Error => error
Expand Down
12 changes: 12 additions & 0 deletions app/services/github_notifications/process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ def do_process

return unless @github_notification.completed?

if Date.current > Date.new(2024, 6, 1)
ReportError.call "remove this!"
end
if compat.invalid?
compats = Compat.where(dependencies: compat.dependencies)
if compats.size == RailsRelease.count && !compats.include?(compat)
compat.destroy
@github_notification.destroy
return
end
end

case @github_notification.conclusion
when "success" then status = :compatible
when 'failure' then status = :incompatible
Expand Down

0 comments on commit 06eb455

Please sign in to comment.