WebHook broker that accepts notifications from multiple platforms and performs simple actions in response
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

__init__.py 621B

12345678910111213141516171819202122232425262728
  1. import os
  2. from .jenkins import Jenkins
  3. from .gitea import Gitea
  4. from .reportbot import ReportBot
  5. def gitea_factory():
  6. return Gitea(os.environ["LAS_GITEA_URL"], os.environ["LAS_GITEA_TOKEN"])
  7. def jenkins_factory():
  8. return Jenkins(
  9. os.environ["LAS_JENKINS_URL"],
  10. os.environ["LAS_JENKINS_USER"],
  11. os.environ["LAS_JENKINS_PASSWORD"],
  12. )
  13. def reportbot_factory():
  14. return ReportBot(
  15. os.environ["LAS_REPORTBOT_URL"],
  16. os.environ["LAS_REPORTBOT_KEY"],
  17. os.environ["LAS_REPORTBOT_CHANNEL"],
  18. )
  19. factories = {"gitea": gitea_factory, "jenkins": jenkins_factory}