diff options
author | Georg | 2021-11-05 13:39:31 +0100 |
---|---|---|
committer | Georg | 2021-11-05 13:39:31 +0100 |
commit | 74a75d3fef872a298e5a1c03a3a151490db510d0 (patch) | |
tree | 24bb6d87ab75caaebbd6586abf62880227ffe3e6 /scripts | |
parent | 01566df11df5eddfbdb14f34eaef3a6f2ada7222 (diff) | |
download | system-74a75d3fef872a298e5a1c03a3a151490db510d0.tar.gz system-74a75d3fef872a298e5a1c03a3a151490db510d0.tar.bz2 system-74a75d3fef872a298e5a1c03a3a151490db510d0.zip |
Organization Clone Script
Signed-off-by: Georg <georg@lysergic.dev>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/python/orgclone.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/python/orgclone.py b/scripts/python/orgclone.py new file mode 100644 index 0000000..139d7c5 --- /dev/null +++ b/scripts/python/orgclone.py @@ -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) |