• Patrick Bajao's avatar
    Refactor PostReceive to be more readable · dff1e638
    Patrick Bajao authored
    This refactors the implementation of gathering/iterating changes
    from the post-receive hook to be a bit more readable (removed
    the need for calling `enum_for(:changes_refs)` in different
    places).
    
    This is done with the help of the new `Gitlab::Git::Changes`
    collection object which will be used while parsing the changes.
    
    Also changed the signature of BranchPushService and TagPushService
    to accept a single `change` param instead of having oldrev, newrev
    and ref params.
    
    This also prepares the `PostReceive` worker to be able to process
    branches and tags separately so we'll be able to aggregate events
    by branches or tags.
    dff1e638
17_cycle_analytics.rb 7.21 KB