• Heinrich Lee Yu's avatar
    Fix missing discussion_id in GitHub imports · ab059891
    Heinrich Lee Yu authored
    The discussion_id method can return `nil` if a previously cached value
    does not exist. This normally does not happen because we process notes
    from GitHub in ID order, so the note we're replying to should already be
    processed.
    
    But we've seen production data where the discussion_id is nil. This may
    be a GitHub API problem where notes are missing or returned out of order,
    or a problem with our cache storage.
    
    This falls back to generating a new discussion_id when this edge
    case happens.
    
    Changelog: fixed
    ab059891
diff_note.rb 5.22 KB