Skip to content

対象githubアカウントの全てのリポジトリから指定したCollaboratorsを削除する。

License

Notifications You must be signed in to change notification settings

TakuyaTaniguchi/removeGitCollaborators

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

removeGitCollaborators

Description

対象のGituhubアカウントの全てのリポジトリから指定したCollaboratorsを削除します。

Usage

始めに、Github管理画面のsettingからAPIKeyを取得してください。
その際、Select scopesのrepoをチェックしてください。

アクセストークンを入手したら下記コマンドを実行しapi.jsonを作成します。

curl  "https://api.github.com/user/repos?access_token={token}&per_page=100&page=1&sort=created" > api.json

remove.phpの変数を指定します。

$Email = 'hoge@gmail.com';
$PASS = 'password';
$USER = 'MYACCOUNT';
$DELTE_USER = 'user_id';

remove.phpを実行します。

php remove.php

Supplement

リポジトリは最大で、100個までしか取得できない。
100個以上のリポジトリを取得する場合は、下記の様に別途追加のjsonファイルを生成し、
ファイルを指定して再度PHPを実行する。

curl  "https://api.github.com/user/repos?access_token={token}&per_page=100&page=2&sort=created" > api_2.json

remove.php

$url = './api_2.json';

About

対象githubアカウントの全てのリポジトリから指定したCollaboratorsを削除する。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages