From 6ac6fa4a9ef75ca80a2b6b9ce0410f494ba52deb Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Wed, 9 Oct 2019 14:34:20 +0100 Subject: [PATCH] Reduced number of GitHub requests (#1298) --- .../components/Material/Source/Adapter/GitHub.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/assets/javascripts/components/Material/Source/Adapter/GitHub.js b/src/assets/javascripts/components/Material/Source/Adapter/GitHub.js index 3dce25a66..272d1bce2 100644 --- a/src/assets/javascripts/components/Material/Source/Adapter/GitHub.js +++ b/src/assets/javascripts/components/Material/Source/Adapter/GitHub.js @@ -59,8 +59,8 @@ export default class GitHub extends Abstract { * @return {Promise>} Promise returning an array of facts */ fetch_() { - const paginate = (page = 0) => { - return fetch(`${this.base_}?per_page=30&page=${page}`) + const paginate = (page = 0) => ( + fetch(`${this.base_}?per_page=100&sort=updated&page=${page}`) .then(response => response.json()) .then(data => { if (!(data instanceof Array)) @@ -87,7 +87,7 @@ export default class GitHub extends Abstract { ] } }) - } + ) /* Paginate through repos */ return paginate()