Browse files

Add a script to watch all my repos

  • Loading branch information...
1 parent a70efd2 commit a28283384b0099b81396ab14b2993c2393172565 @mizzy committed Jan 25, 2013
Showing with 17 additions and 0 deletions.
  1. +17 −0 watch_all_my_repos.rb
View
17 watch_all_my_repos.rb
@@ -0,0 +1,17 @@
+#!/usr/bin/env ruby
+
+require 'pit'
+require 'octokit'
+
+def octokit
+ config = Pit.get('github', :require => {
+ 'username' => 'Your user name of GitHub',
+ 'password' => 'Your password of GitHub',
+ })
+ Octokit::Client.new(:login => config['username'], :password => config['password'])
+end
+
+octokit.repos.each do |repo|
+ next if repo.owner.login != 'mizzy'
+ octokit.update_subscription("mizzy/#{repo.name}", {subscribed: true})
+end

0 comments on commit a282833

Please sign in to comment.