如何使用python
在bugzilla中创建新的bugBugzilla 5.0.2版 和Python 2.7
以下链接说我们可以创建: https://www.bugzilla.org/docs/4.4/en/html/api/Bugzilla/WebService/Bug.html#create
但我正在寻找示例代码
答案 0 :(得分:1)
You could also try using python-bugzilla.
https://pypi.python.org/pypi/python-bugzilla/1.2.2
Here is sample code to get a bug.
import bugzilla
bz = bugzilla.Bugzilla(url="https://bugzilla.kernel.org")
print bz.getbug(1)
答案 1 :(得分:0)
需要安装:easy_install bugsy
这是Python代码:
import bugsy
bugsyObj = bugsy.Bugsy(username="user@abc.com", password="passwd23", userid=None, cookie=None, api_key=None, bugzilla_url='http://11.110.2.212/bugzilla/rest')
bug = bugsy.Bug()
bug.product="PRODUCT_REQUEST"
bug.component="Work for Windows"
bug.summary = "THIS IS JUST TEST FROM BUGSY"
bug.add_comment("THE COMMENT SECTION")
bug.assigned_to="assignuser@abc.com"
bugsyObj.put(bug)
bug.id
这将返回Bugzilla的bug id。它需要
答案 2 :(得分:0)
用python编写的示例示例,使用其余的API在Bugzilla 5.x中创建一个错误。
import requests
data = {
"product" : "TestProduct",
"component" : "TestComponent",
"summary" : "This is the best bug report",
"version" : "unspecified",
"description" : "This is the best GUI for reporting bugs"
}
url_bz_restapi = 'http://localhost/bugzilla/rest.cgi/bug'
r = requests.post(url_bz_restapi, data=data)
答案 3 :(得分:0)
import os
while True:
pass
os.startfile(your file name)
os.startfile(hi.py)