Create a test project and story
All checks were successful
buildbot/travis_bionic Build done.
buildbot/multibuild_parent Build done.

This commit is contained in:
Peter Šurda 2024-06-02 23:07:38 +08:00
parent 5757c87e43
commit 727829958d
Signed by: PeterSurda
GPG Key ID: 3E47497CF67ABB95
2 changed files with 35 additions and 0 deletions

32
main.py Normal file
View File

@ -0,0 +1,32 @@
#/usr/bin/env python
import os
from dotenv import load_dotenv
from taiga import TaigaAPI
load_dotenv()
print("Creating object")
api = TaigaAPI(host=os.getenv('HOST'))
print("Authenticating")
api.auth(
username=os.getenv('USERNAME'),
password=os.getenv('PASSWORD')
)
#new_project = api.projects.get_by_slug('test')
#print(new_project)
print("Creating test project")
new_project = api.projects.create('TEST PROJECT', 'TESTING API')
print("Creating test story")
userstory = new_project.add_user_story(
'New Story', description='Blablablabla'
)
print("Done")

3
requirements.txt Normal file
View File

@ -0,0 +1,3 @@
py-gitea
python-taiga @ git+https://github.com/PeterSurda/python-taiga
python-dotenv