diff --git a/Gemfile b/Gemfile index ad1518b..6c5b2a4 100644 --- a/Gemfile +++ b/Gemfile @@ -10,4 +10,8 @@ group :jekyll_plugins do gem 'jekyll-livereload' end +group :scripts do + gem 'octokit' +end + gem 'rb-fsevent', '0.9.8' # See issue https://github.com/guard/listen/issues/431 diff --git a/_apps/dco.md b/_apps/dco.md index 07db96f..39f3544 100644 --- a/_apps/dco.md +++ b/_apps/dco.md @@ -8,7 +8,7 @@ organizations: - linuxfoundation - kubernetes - nodejs -stars: 142 +stars: 19 installs: 48 author: bkeepers repository: probot/dco diff --git a/_apps/duplicate-issues.md b/_apps/duplicate-issues.md index 66246a4..62c0294 100644 --- a/_apps/duplicate-issues.md +++ b/_apps/duplicate-issues.md @@ -1,8 +1,8 @@ --- title: Duplicate Issues -description: Identify duplicate issues +description: Automatically detects duplicate issues slug: dup -stars: 14 +stars: 15 installs: 4 author: MarshallOfSound repository: MarshallOfSound/probot-issue-duplicate-detection diff --git a/_apps/settings.md b/_apps/settings.md index 1d84656..0538b5f 100644 --- a/_apps/settings.md +++ b/_apps/settings.md @@ -4,7 +4,7 @@ description: Pull Requests for repository settings slug: settings topics: - administration -stars: 114 +stars: 121 installs: 38 author: bkeepers repository: probot/configurer diff --git a/_apps/snooze.md b/_apps/snooze.md index a9d4211..7abe111 100644 --- a/_apps/snooze.md +++ b/_apps/snooze.md @@ -3,7 +3,7 @@ title: Snooze description: Temporarily close Issues and Pull Requests slug: snooze author: jbjonesjr -stars: 2 +stars: 3 installs: 5 repository: jbjonesjr/probot-snooze --- diff --git a/_apps/stale.md b/_apps/stale.md index f5df9d8..6e742f0 100644 --- a/_apps/stale.md +++ b/_apps/stale.md @@ -15,7 +15,7 @@ organizations: - github - npm author: bkeepers -stars: 112 +stars: 124 installs: 305 repository: probot/stale --- diff --git a/_apps/wip.md b/_apps/wip.md index 4aaf1b6..4296502 100644 --- a/_apps/wip.md +++ b/_apps/wip.md @@ -3,7 +3,7 @@ title: Work In Progress description: Prevent merging of unfinished Pull Requests slug: wip author: gr2m -stars: 4 +stars: 5 installs: 7 repository: gr2m/wip-bot --- diff --git a/script/sync-stars b/script/sync-stars new file mode 100755 index 0000000..ad8a25a --- /dev/null +++ b/script/sync-stars @@ -0,0 +1,18 @@ +#!/usr/bin/env ruby +# Sync star counts from GitHub + +require "octokit" +client = Octokit::Client.new(:access_token => ENV["GITHUB_TOKEN"]) + +require "jekyll" +config = Jekyll.configuration("source" => File.expand_path('../', File.dirname(__FILE__))) +site = Jekyll::Site.new(config) +site.read + +site.collections["apps"].docs.each do |app| + repo = client.repository(app['repository']) + + content = File.read(app.path) + content.sub!(/^stars: \d+$/, "stars: #{repo[:stargazers_count]}") + File.write(app.path, content) +end