Moving git logic from Travis to node script