Further git test code

This commit is contained in:
Manuel83
2017-10-13 21:54:20 +02:00
parent a265d3a8cc
commit f07a2bdd7a
+13 -2
View File
@@ -1,7 +1,18 @@
import requests
from git import Repo, Git from git import Repo, Git
repo = Repo('./') repo = Repo('./')
print repo print repo
for remote in repo.remotes: for remote in repo.remotes:
print remote
remote.fetch()ls remote.fetch()
url = 'https://api.github.com/repos/manuel83/craftbeerpi3/releases'
response = requests.get(url)
result = []
for r in response.json():
result.append({"tag_name": r.get("tag_name"), "timestamp": r.get("created_at")})
print result