-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Currently, there is one way to update whether you are subscribed to a repo, and it toggles it. As a result, if you have a list of repos which you want to subscribe to or unsubscribe from, you need to first separate them out by whether you are currently subscribed to them.
This is something which came up for me due to a recent migration to GitHub for work, which resulted in the creation of hundreds of new repos which I can commit to, all of which I was automatically subscribed to. I manually turned some off. Then another few waves of migrated repos came through. I set out to automate this. gh repo list $workorg -L 400 --json url -t '{{range .}}{{.url}}{{"\n"}}{{end}}' | xargs -L1 gh notify -u does the trick, after I forced the action to always unsubscribe.
My changes don't let you subscribe anymore, and do less error checking, so they're not suitable for merging.
A simple approach would be to add another argument to set it to something specific. Another one would be to have flags for each possible state that can be set via GraphQL.