Refactored code to share angularjs factory code for displaying deploys on the recents page