mirror of
https://github.com/Luzifer/github-masswatch.git
synced 2024-12-22 19:11:17 +00:00
Bugfix: Unwatch was not working
This commit is contained in:
parent
cc710435cb
commit
b27e1c9aaa
2 changed files with 25 additions and 15 deletions
28
README.md
28
README.md
|
@ -17,6 +17,17 @@ This project is a small helper for mass-watching / unwatching in GitHub reposito
|
|||
# bundle install
|
||||
[...]
|
||||
|
||||
# ruby watch.rb help
|
||||
Commands:
|
||||
watch.rb help [COMMAND] # Describe available commands or one specific command
|
||||
watch.rb list <regex> # lists all repos, useful to test your watch regex
|
||||
watch.rb unwatch <regex> # unwatch all repos matching your regex
|
||||
watch.rb watch <regex> # watch all repos matching your regex
|
||||
watch.rb watched <regex> # show all watched repos, useful to test your unwatch regex
|
||||
|
||||
Options:
|
||||
[--token=TOKEN]
|
||||
|
||||
# ruby watch.rb list --token=<mytoken>
|
||||
Luzifer/alarmclock
|
||||
Luzifer/alfred-fold
|
||||
|
@ -25,14 +36,11 @@ Luzifer/AMZWishlist
|
|||
Luzifer/awsenv
|
||||
[...]
|
||||
|
||||
# ruby watch.rb watch '^Luzifer/.*' --token=<mytoken>
|
||||
Subscribing to Luzifer/blog.knut.me...
|
||||
Subscribing to Luzifer/go-selfupdate...
|
||||
Subscribing to Luzifer/golang-builder...
|
||||
Subscribing to Luzifer/habitrpg...
|
||||
Subscribing to Luzifer/homebrew...
|
||||
Subscribing to Luzifer/homebrew-tools...
|
||||
Subscribing to Luzifer/license...
|
||||
Subscribing to Luzifer/radiopi...
|
||||
Subscribing to Luzifer/simpleproxy...
|
||||
# ruby watch.rb list '^Luzifer/alfred-.*' --token=<mytoken>
|
||||
Luzifer/alfred-fold
|
||||
Luzifer/alfred-pwdgen
|
||||
|
||||
# ruby watch.rb watch '^Luzifer/alfred-.*' --token=<mytoken>
|
||||
Subscribing to Luzifer/alfred-fold...
|
||||
Subscribing to Luzifer/alfred-pwdgen...
|
||||
```
|
||||
|
|
4
watch.rb
4
watch.rb
|
@ -35,8 +35,10 @@ class WatchCLI < Thor
|
|||
def unwatch(regex)
|
||||
subscriptions = get_subscriptions()
|
||||
get_repos().each do |repo|
|
||||
if subscriptions.include?(repo.full_name) and /#{regex}/.match(repo.full_name)
|
||||
puts "Unsubscribing from #{repo.full_name}..."
|
||||
get_octokit().update_subscription(repo.full_name, {subscribed: false}) if subscriptions.include?(repo.full_name) and /#{regex}/.match(repo.full_name)
|
||||
get_octokit().delete_subscription(repo.full_name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue