Helga 的 Koji 插件
项目描述
关于
Helga 是一个 Python 聊天机器人。完整的文档可以在 http://helga.readthedocs.org找到。
这个 Koji 插件允许 Helga 响应 IRC 中与 koji 相关的命令并打印有关构建和任务的信息。
估计当前(正在进行的)构建何时完成:
03:14 < ktdreyer> helgabot: current ceph build
03:14 < helgabot> ktdreyer, ceph-12.2.1-1.el7cp should finish building in
3 min 45 sec
https://cbs.centos.org/koji/buildinfo?buildID=20348
了解最近完成的构建需要多长时间才能完成:
03:14 < ktdreyer> helgabot: last ceph build
03:14 < helgabot> ktdreyer, ceph-12.2.2-0.el7 build duration was 2 hr 49 min
https://cbs.centos.org/koji/buildinfo?buildID=21149
查询包裹:
03:14 < ktdreyer> helgabot: ceph package
03:14 < helgabot> ktdreyer, ceph is
https://cbs.centos.org/koji/packageinfo?packageID=534
查找用户的任务:
03:14 < ktdreyer> helgabot: soandso's tasks
03:14 < helgabot> ktdreyer, soandso's kernel scratch build should be done in
1 hr 26 min
(https://koji.example.com/koji/taskinfo?taskID=15741633)
通过 URL 估计任务:
< ktdreyer> helgabot: https://koji.example.com/koji/taskinfo?taskID=12456
< helgabot> ktdreyer, that kernel scratch build should be done in 1 hr 26
min.
安装
这个 Koji 插件可以从 PyPI 获得,所以你可以简单地用pip安装它:
pip install helga-koji
如果您想破解 helga-koji 源代码,请在您运行 Helga 的 virtualenv 中,从 GitHub 克隆此存储库的副本并运行 python setup.py develop。
配置
helga-koji 使用txkoji库,它在~/.koji/config.d/*.conf和 /etc/koji.conf.d/*.conf中查找配置文件。要为你的 Koji 实例配置 helga-koji,你必须在磁盘的这个位置有配置文件。这就是普通koji 客户端的工作方式。
去做
看任务:
< ktdreyer> helgabot: watch
https://koji.example.com/koji/taskinfo?taskID=12456
< helgabot> ktdreyer, that kernel scratch build should be done in 1 hr 26
min. I'll tell you when it's done.
或代他人观看:
< ktdreyer> helgabot: watch
https://koji.example.com/koji/taskinfo?taskID=12456 for adeza
< helgabot> ktdreyer, that kernel scratch build should be done in 1 hr 26
min. I'll tell that person when it's done.