Organization Clone Script
Signed-off-by: Georg <georg@lysergic.dev>
This commit is contained in:
parent
f459a2b998
commit
d2eacf9efe
18
scripts/python/orgclone.py
Normal file
18
scripts/python/orgclone.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/local/bin/python3.8
|
||||||
|
import requests
|
||||||
|
from git import Repo
|
||||||
|
|
||||||
|
organization = 'LibertaCasa'
|
||||||
|
URL = 'https://git.com.de/api/v1/orgs/' + organization + '/repos'
|
||||||
|
|
||||||
|
response = requests.get(
|
||||||
|
URL,
|
||||||
|
headers = {'accept': 'application/json'},
|
||||||
|
)
|
||||||
|
data = response.json()
|
||||||
|
repo = []
|
||||||
|
for repos in data:
|
||||||
|
reponame = repos['name']
|
||||||
|
repourl = repos['ssh_url']
|
||||||
|
print(reponame + ' ' + repourl)
|
||||||
|
Repo.clone_from(repourl, reponame)
|
Loading…
Reference in New Issue
Block a user