Permalink
Browse files

Update to new GitHub API

  • Loading branch information...
1 parent bdedf9d commit 8d01e336a91acf442d50089ca61831ad2c2875a9 @lsegal lsegal committed Sep 23, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/scm_checkout.rb
View
@@ -134,8 +134,8 @@ def clear_source_files
def fork?
return @is_fork unless @is_fork.nil?
if !File.directory?(File.join(settings.repos, name))
- json = JSON.parse(open("http://github.com/api/v1/json/#{username}").read)
- proj_json = json["user"]["repositories"].find {|s| s["name"] == project }
+ json = JSON.parse(open("https://api.github.com/users/#{username}/repos").read)
+ proj_json = json.find {|s| s["name"] == project }
@is_fork = proj_json["fork"] if proj_json
else
@is_fork = true

0 comments on commit 8d01e33

Please sign in to comment.