• Erick Bajao's avatar
    Batch load pipelines instead of statuses · ecf18fcf
    Erick Bajao authored
    Instead of preloading the status, we now preload the
    latest pipelines instead for each commit. This gives us more
    flexibility on how to display the status.
    
    This also helps us avoid passing the current_user deep through
    the model methods. Best to call the detailed_status in the
    view/presentation layer.
    
    We also extracted commit's pipeline behavior into its own class.
    This is to better isolate and organize the pipeline related behavior
    of the Commit object.
    
    Moving the pipeline behavior into its own class resulted
    to a lot of breaking changes though. So instead of always having to
    create your own instance of a CommitWithPipeline, we're just gonna
    use the same commit object but just delegate the pipeline related
    calls to the CommitWithPipeline instance.
    ecf18fcf
commit_collection_spec.rb 5.36 KB