test: update
Some checks failed
WakaReadme CI / UnitTests (push) Failing after 19s

This commit is contained in:
2024-01-15 02:38:12 +08:00
parent 5dc349128a
commit 108a90abce
3 changed files with 30 additions and 16 deletions

12
test_giteaapi.py Normal file
View File

@@ -0,0 +1,12 @@
from gitea import *
URL = "https://git.mamahaha.work"
TOKEN = open("token.log", "r").read().strip()
gitea_connect = Gitea(URL, TOKEN)
print("Gitea Version: " + gitea_connect.get_version())
print("API-Token belongs to user: " + gitea_connect.get_user().username)
#repository = "sangge/tpre-python"
#target_branch = "main"
#gitea_repo = gitea_connect.get_repo(str(repository))
#gitea_branch = gitea_repo.get_branch(target_branch)
#print(gitea_branch)