From 42d9dff5d47e4abfee4ed1639a055f15528e4e7a Mon Sep 17 00:00:00 2001 From: Trent Palmer Date: Mon, 31 Jul 2017 06:45:01 -0700 Subject: [PATCH] fix star_gazers assignment for theme repos which are forks --- rank_hugo_themes.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rank_hugo_themes.bash b/rank_hugo_themes.bash index 820fbcc..65142a2 100755 --- a/rank_hugo_themes.bash +++ b/rank_hugo_themes.bash @@ -43,8 +43,8 @@ do stars="" stars=$(curl -s "${REPOS_API_URL}/${hugo_theme_user}/${hugo_theme}" \ - | grep stargazers_count | awk '{print $2}' | sed -e 's/,$//g' \ - | awk '{print $NF}') + | grep stargazers_count | head -1 | awk '{print $2}' \ + | sed -e 's/,$//g') [[ -n "${stars}" ]] || continue last_commit_date=""