Skip to content

Instantly share code, notes, and snippets.

@bibendi
Last active November 1, 2018 17:34
Show Gist options
  • Save bibendi/89b04ec4758944d0f834b052febaa3f5 to your computer and use it in GitHub Desktop.
Save bibendi/89b04ec4758944d0f834b052febaa3f5 to your computer and use it in GitHub Desktop.
Unwatch all Organization's repositories
require "octokit"
client = Octokit::Client.new(access_token: "")
client.auto_paginate = true
client.organization_repositories('abak-press', type: 'all').each do |repo|
client.delete_subscription(repo.id)
client.forks(repo.id).each do |fork|
client.delete_subscription(fork.id)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment