Skip to content

Commit

Permalink
Merge pull request #527 from bastelfreak/bla
Browse files Browse the repository at this point in the history
rework forge API handling
  • Loading branch information
bastelfreak authored Dec 27, 2018
2 parents 7685f56 + 2210fb3 commit ab9bfc9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/get_all_the_diffs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require 'json'
require 'open-uri'
require 'yaml'
require 'puppet_forge'

# we removed the following modules from our modulesync_config / hide it because they are not Puppet modules but match the puppet- pattern
# The modules in the list are broken, unfinished or got migrated (yes, that really happens from time to time)
Expand Down Expand Up @@ -43,8 +44,9 @@ not_synced_repos = repos.select{|repo| !modulesync_repos.include?(repo)}

# get all forge releases
puts "get data from the forge API" if DEBUG
forge_response = JSON.load(open('https://forgeapi.puppetlabs.com:443/v3/modules?owner=puppet&limit=200'))
forge_releases = forge_response['results'].map{|release| release['slug']}
PuppetForge.user_agent = "VoxPupuli/0.1 get_all_diffs script"
vp = PuppetForge::User.find('puppet')
forge_releases = vp.modules.unpaginated.map(&:slug)

# get all modules that are in modulesync_config but not released
unreleased_modules = modulesync_repos.reject{|repo| forge_releases.include?(repo)}
Expand Down

0 comments on commit ab9bfc9

Please sign in to comment.