Skip to content

Instantly share code, notes, and snippets.

@CyborgPatrick
Created August 5, 2014 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CyborgPatrick/f6574bf8461a04517e7c to your computer and use it in GitHub Desktop.
Save CyborgPatrick/f6574bf8461a04517e7c to your computer and use it in GitHub Desktop.
Unwatch all repos in an organisation
var auth_token = $("input[name='authenticity_token']")[0].value;
$("a.repo-name[href^='/THEORG']").each(function($elem){
$.post("/notifications/subscribe", {
authenticity_token : auth_token,
do : 'included',
'repository_id' : $("form.js-unsubscribe-form #repository_id", $(this).parent("li")).val()
});
});
@CyborgPatrick
Copy link
Author

When run, unwatches all repos in 'THEORG' organisation

@AbhimanyuAryan
Copy link

looks like this is some jquery code. Where do I execute it? Creating unwatchAll.js on my machine but how do I execute this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment