diff --git a/_apps/dco.md b/_apps/dco.md index 39f3544..1b9efc1 100644 --- a/_apps/dco.md +++ b/_apps/dco.md @@ -9,7 +9,7 @@ organizations: - kubernetes - nodejs stars: 19 -installs: 48 +installations: 48 author: bkeepers repository: probot/dco topics: diff --git a/_apps/duplicate-issues.md b/_apps/duplicate-issues.md index 62c0294..5b35f06 100644 --- a/_apps/duplicate-issues.md +++ b/_apps/duplicate-issues.md @@ -3,7 +3,7 @@ title: Duplicate Issues description: Automatically detects duplicate issues slug: dup stars: 15 -installs: 4 +installations: 4 author: MarshallOfSound repository: MarshallOfSound/probot-issue-duplicate-detection --- diff --git a/_apps/settings.md b/_apps/settings.md index 0538b5f..ce99b1d 100644 --- a/_apps/settings.md +++ b/_apps/settings.md @@ -4,8 +4,8 @@ description: Pull Requests for repository settings slug: settings topics: - administration -stars: 121 -installs: 38 +stars: 123 +installations: 38 author: bkeepers repository: probot/configurer --- diff --git a/_apps/snooze.md b/_apps/snooze.md index 7abe111..fa5ad8b 100644 --- a/_apps/snooze.md +++ b/_apps/snooze.md @@ -4,6 +4,6 @@ description: Temporarily close Issues and Pull Requests slug: snooze author: jbjonesjr stars: 3 -installs: 5 +installations: 5 repository: jbjonesjr/probot-snooze --- diff --git a/_apps/stale.md b/_apps/stale.md index 6e742f0..43a9d92 100644 --- a/_apps/stale.md +++ b/_apps/stale.md @@ -9,15 +9,20 @@ topics: - project-management organizations: - atom -- rails -- homebrew -- exercism -- github -- npm +- Homebrew +- fchollet +- hexojs +- apollographql +- sequelize +- hubotio +- mochajs +- nodemailer +- tldr-pages author: bkeepers -stars: 124 -installs: 305 +stars: 129 +installations: 98 repository: probot/stale +host: https://probot-stale.herokuapp.com --- Automatically close stale Issues and Pull Requests that tend to accumulate during a project. diff --git a/_apps/wip.md b/_apps/wip.md index 4296502..9a1853e 100644 --- a/_apps/wip.md +++ b/_apps/wip.md @@ -4,6 +4,6 @@ description: Prevent merging of unfinished Pull Requests slug: wip author: gr2m stars: 5 -installs: 7 +installations: 7 repository: gr2m/wip-bot --- diff --git a/_layouts/app.html b/_layouts/app.html index 03d9795..6817268 100644 --- a/_layouts/app.html +++ b/_layouts/app.html @@ -17,7 +17,7 @@ layout: default Add to GitHub
-
{% octicon cloud-download width:14 class:"v-align-middle" %} {{ page.installs }}
+
{% octicon cloud-download width:14 class:"v-align-middle" %} {{ page.installations }}
{% octicon star heigh:16 class:"v-align-middle" %} {{ page.stars }}
diff --git a/index.html b/index.html index 6c8dc85..23c5477 100644 --- a/index.html +++ b/index.html @@ -49,7 +49,7 @@ layout: default

{{ app.description }}

-
{% octicon cloud-download width:14 class:"v-align-middle" %} {{ app.installs }}
+
{% octicon cloud-download width:14 class:"v-align-middle" %} {{ app.installations }}
{% octicon star heigh:16 class:"v-align-middle" %} {{ app.stars }}
diff --git a/script/sync-stars b/script/sync-stars index ad8a25a..b2db27a 100755 --- a/script/sync-stars +++ b/script/sync-stars @@ -1,6 +1,8 @@ #!/usr/bin/env ruby # Sync star counts from GitHub +require 'open-uri' + require "octokit" client = Octokit::Client.new(:access_token => ENV["GITHUB_TOKEN"]) @@ -10,9 +12,18 @@ site = Jekyll::Site.new(config) site.read site.collections["apps"].docs.each do |app| + puts "Syncing #{app['repository']}" repo = client.repository(app['repository']) content = File.read(app.path) content.sub!(/^stars: \d+$/, "stars: #{repo[:stargazers_count]}") + + if app['host'] + stats = JSON.parse(URI(app['host'] + '/stats').open.read) + content.sub!(/^installations: \d+$/, "installations: #{stats['installations']}") + yaml = YAML.dump(stats['popular'].map { |org| org['login'] }).sub('---', '') + content.sub!(/^organizations:\n(- .*\n)*/, "organizations:#{yaml}") + end + File.write(app.path, content) end