fix easyfix
This commit is contained in:
parent
39ded73267
commit
a2281d18eb
2 changed files with 2 additions and 39 deletions
|
@ -113,7 +113,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="tabs">
|
<div id="tabs">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#tabs-1">Fedora hosted projects</a></li>
|
<li><a href="#tabs-1">Fedora pagure and github projects</a></li>
|
||||||
<li><a href="#tabs-2">Bugzilla</a></li>
|
<li><a href="#tabs-2">Bugzilla</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
|
|
@ -41,8 +41,7 @@ from kitchen.text.converters import to_bytes
|
||||||
from jinja2 import Template
|
from jinja2 import Template
|
||||||
|
|
||||||
__version__ = '0.1.1'
|
__version__ = '0.1.1'
|
||||||
bzclient = RHBugzilla(url='https://bugzilla.redhat.com/xmlrpc.cgi',
|
bzclient = RHBugzilla(url='https://bugzilla.redhat.com/xmlrpc.cgi', cookiefile=None, tokenfile=None)
|
||||||
cookiefile=None)
|
|
||||||
# So the bugzilla module has some way to complain
|
# So the bugzilla module has some way to complain
|
||||||
logging.basicConfig()
|
logging.basicConfig()
|
||||||
logger = logging.getLogger('bugzilla')
|
logger = logging.getLogger('bugzilla')
|
||||||
|
@ -173,27 +172,6 @@ def gather_project():
|
||||||
return projects
|
return projects
|
||||||
|
|
||||||
|
|
||||||
def get_open_tickets_for_keyword(project, keyword):
|
|
||||||
""" For a given project return the tickets ID which have the given
|
|
||||||
keyword attached.
|
|
||||||
:arg project, name of the project on fedorahosted.org
|
|
||||||
:arg keyword, search the trac for open tickets having this keyword
|
|
||||||
in the keywords field.
|
|
||||||
"""
|
|
||||||
tickets = []
|
|
||||||
try:
|
|
||||||
server = xmlrpclib.ServerProxy(
|
|
||||||
'https://fedorahosted.org/%s/rpc' % project)
|
|
||||||
query = 'status=assigned&status=new&status=reopened&' \
|
|
||||||
'keywords=~%s' % keyword
|
|
||||||
for ticket in server.ticket.query(query):
|
|
||||||
tickets.append(server.ticket.get(ticket))
|
|
||||||
except xmlrpclib.Error, err:
|
|
||||||
print ' Could not retrieve information for project: %s' % project
|
|
||||||
print ' Error: %s' % err
|
|
||||||
return tickets
|
|
||||||
|
|
||||||
|
|
||||||
def parse_arguments():
|
def parse_arguments():
|
||||||
parser = argparse.ArgumentParser(__doc__)
|
parser = argparse.ArgumentParser(__doc__)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
@ -269,21 +247,6 @@ def main():
|
||||||
project.name, ticket['id'])
|
project.name, ticket['id'])
|
||||||
ticketobj.status = ticket['status']
|
ticketobj.status = ticket['status']
|
||||||
tickets.append(ticketobj)
|
tickets.append(ticketobj)
|
||||||
else:
|
|
||||||
project.url = 'https://fedorahosted.org/%s/' % (project.name)
|
|
||||||
project.site = 'trac'
|
|
||||||
for ticket in get_open_tickets_for_keyword(project.name,
|
|
||||||
project.tag):
|
|
||||||
ticket_num = ticket_num + 1
|
|
||||||
ticketobj = Ticket()
|
|
||||||
ticketobj.id = ticket[0]
|
|
||||||
ticketobj.title = ticket[3]['summary']
|
|
||||||
ticketobj.url = 'https://fedorahosted.org/%s/ticket/%s' %(
|
|
||||||
project.name, ticket[0])
|
|
||||||
ticketobj.status = ticket[3]['status']
|
|
||||||
ticketobj.type = ticket[3]['type']
|
|
||||||
ticketobj.component = ticket[3]['component']
|
|
||||||
tickets.append(ticketobj)
|
|
||||||
project.tickets = tickets
|
project.tickets = tickets
|
||||||
|
|
||||||
bzbugs = gather_bugzilla_easyfix()
|
bzbugs = gather_bugzilla_easyfix()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue