taiga_sprint4_deploy.py 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import requests, urllib3
  2. urllib3.disable_warnings()
  3. auth = requests.post(
  4. 'https://192.168.130.161/taiga/api/v1/auth',
  5. json={'type': 'normal', 'username': 'lanfr1904@outlook.com', 'password': 'BTSai123'},
  6. verify=False
  7. ).json()
  8. headers = {'Authorization': f'Bearer {auth["auth_token"]}'}
  9. proj_id = 21
  10. sprint4_id = 71
  11. us_list = requests.get(f'https://192.168.130.161/taiga/api/v1/userstories?project={proj_id}', headers=headers, verify=False).json()
  12. tasks = [
  13. "Refactor Cryptography Bug - Replace dynamic salting loop with bcrypt.checkpw",
  14. "Implement Horizontal Table Partitioning to bypass MySQL 65KB InnoDB limit",
  15. "Construct dynamic UI multiselect for mapping 200 CSV columns seamlessly",
  16. "Bind Pandas dataframes tightly to Memory logic preventing UI crashes",
  17. "Overwrite LLM system prompts strictly for native Markdown gram output",
  18. "Configure native mail throttle limits to block .pt.lu bounce delays"
  19. ]
  20. target_us = None
  21. for us in us_list:
  22. if "Sprint 4" in us['subject'] or us['milestone'] is None:
  23. target_us = us
  24. # Patch US to Sprint 4 milestone
  25. res = requests.patch(f"https://192.168.130.161/taiga/api/v1/userstories/{us['id']}",
  26. headers=headers,
  27. json={"milestone": sprint4_id, "version": us['version']},
  28. verify=False)
  29. print(f"Mapped US {us['id']} ({us['subject']}) into Sprint 4 Milestone!")
  30. for t in tasks:
  31. requests.post('https://192.168.130.161/taiga/api/v1/tasks', headers=headers, json={"project": proj_id, "user_story": us['id'], "subject": t}, verify=False)
  32. print(f"Successfully appended granular deployment tasks into US: {us['id']}")
  33. if not target_us:
  34. print("No open unassigned User Stories found to append Sprint 4 data.")