Create a test project and story
This commit is contained in:
parent
5757c87e43
commit
727829958d
32
main.py
Normal file
32
main.py
Normal 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
3
requirements.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
py-gitea
|
||||||
|
python-taiga @ git+https://github.com/PeterSurda/python-taiga
|
||||||
|
python-dotenv
|
Loading…
Reference in New Issue
Block a user