desc "delete NAME", "delete public repository NAME from your github account"
def delete(name)
authenticated do
user = Api.api.user
puts "user:" + user.inspect
repository = user.repositories.find(name)
puts "repo:" + repository.inspect
say "Repository #{name} was deleted successfully" if repository.delete!
end
end
desc "collaborators NAME", "list all collaborators for repository NAME"
def collaborators(name)
user = Api.api.user
repository = user.repositories.find(name)
result = repository.collaborators
puts result.inspect
end
I get the error below for all other tasks using this kind of recipe (issues, branches, tags...).
What am I doing wrong?
I am able to perform the delete! (with no effect) with the same tactic !?
I can see that the user and repo objects when doing the delete are as expected :)
kristian-mandrups-macbook-pro:lib kristianconsult$ thor github:repo:delete cool_stuff
W, [2010-04-05T16:11:26.188454 #28728] WARN -- : Using in memory store
user:#, @collaborators=0, @disk_usage=29781, @private_gist_count=3, @owned_private_repo_count=0, @total_private_repo_count=0>
repo:#, @collaborators=0, @disk_usage=29781, @private_gist_count=3, @owned_private_repo_count=0, @total_private_repo_count=0>, @open_issues=0>
Repository cool_stuff was deleted successfully
kristian-mandrups-macbook-pro:lib kristianconsult$ thor github:repo:collaborators cool_stuff
W, [2010-04-05T16:11:58.805560 #28903] WARN -- : Using in memory store
GitHub returned status 403. Retrying request.
/Users/kristianconsult/.rvm/gems/ruby-1.9.1-p378/gems/octopi-0.2.8/lib/octopi/api.rb:129:in `rescue in get': Github returned status 403, you may not have access to this resource. (Octopi::APIError)
I get the error below for all other tasks using this kind of recipe (issues, branches, tags...). What am I doing wrong? I am able to perform the delete! (with no effect) with the same tactic !?
I can see that the user and repo objects when doing the delete are as expected :)
Thanks!