How to easily delete multiple repositories on github?

I understand that I watch too many repositories on GitHub, and the only way I found that it does not work is to go to github.com/my_user_name/, following each of them and pressing the Unwatch button.

Is there no way to speed up and speed up their removal?

+45
github
Jun 15 '12 at 1:00
source share
6 answers

For the lazy, this can be done without the API quickly enough at this URL: https://github.com/watching

A clean simple list, click-to-click.

In addition, there is a box that is golden. Uncheck the box so that it is not automatically configured to view all repositories to which you provide push access. Hooray to control signal to noise ratio.

+97
May 15 '13 at 19:23
source share

Specific organization

If you just want to disable repositions from one organization, you can use this from https://github.com/watching

$('.js-subscription-row').each(function(){ var isYourOrganisation = $(this).find("a[href^='/YOUR_ORG']"); if(isYourOrganisation.length){ $(this).find('button:contains("Unwatch")').click(); } });

Replace YOUR_ORG with what you call your organization.

+7
Jan 12 '15 at 23:18
source share

Native version of JS previous answer . Go to https://github.com/watching and then run:

Oneliner:

 Array.prototype.slice.apply(document.querySelectorAll('.js-subscription-row')).forEach(el => { const org = el.querySelector('a[href^="/YOUR_ORG"]'); if (org) el.querySelector('button').click()}) 

expanded:

 const org = 'YOUR_ORG' const query = document.querySelectorAll('.js-subscription-row') const rows = Array.prototype.slice.apply(query) rows.forEach(function (el) { const org = el.querySelector('a[href^="/' + org + '"]') if (org) el.querySelector('button').click() }) 
+7
Apr 14 '16 at 13:25
source share

Github has an API . You can write a script for this using the Github API, especially the part that deals with the following repositories .

+2
Jun 15 2018-12-12T00:
source share

I have not seen anything, but since we have the power of the whole universe (in short, we are developers). Use their developer API and create a small tool. The API is very descriptive,

http://developer.github.com/

+1
Jun 15 2018-12-12T00:
source share

I also found a command line tool that uses the GitHub API to unlock multiple repositories: https://www.npmjs.com/package/github-unwatch-org-repos

I am not a fan of command line tools that want to use my password in text form on the command line (this way it is displayed to all users of the system who launch "ps" at the right time, and also are saved as plain text in ~ / .bash_history, unless you take special care to avoid this), so I have not tried.

0
Feb 20 '15 at 9:18
source share



All Articles