diff --git a/.gitignore b/.gitignore index ee47622..b284f1b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ config.js server.* .vagrant main.css +config.js.txt diff --git a/lib/static/static/js/controllers/repositoriesCtrl.js b/lib/static/static/js/controllers/repositoriesCtrl.js index bb1e76e..f12aae3 100644 --- a/lib/static/static/js/controllers/repositoriesCtrl.js +++ b/lib/static/static/js/controllers/repositoriesCtrl.js @@ -58,6 +58,11 @@ } function addRepo(repo) { + for (var i = 0; i < $scope.repositories.length; i++) + if ($scope.repositories[i].id === repo.id) + return; + + var newRepos = $scope.repositories.concat(repo); newRepos.sort(function(a,b) { return a.full_name.localeCompare(b.full_name); }); $scope.repositories = newRepos;