Skip to content

Instantly share code, notes, and snippets.

@danielhusar
Created June 12, 2015 12:41
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 danielhusar/ed64f570f54fdad31b41 to your computer and use it in GitHub Desktop.
Save danielhusar/ed64f570f54fdad31b41 to your computer and use it in GitHub Desktop.
Unsubscribe from all organisation repos
var auth_token = $("input[name='authenticity_token']")[0].value;
$(".js-subscription-row > a[href^='/ORGANISATION']").each(function($elem){
$.post("/notifications/subscribe", {
authenticity_token : auth_token,
do : 'included',
'repository_id' : $("form.js-unsubscribe-form [name='repository_id']", $(this).parent("li")).val()
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment