Mar 1, 2007

Bugzilla Automation - Logging In

I want to show you my tools to automate some tasks in Bugzilla, in particular in

  • a Konqueror plugin that downloads attached logs to a particular directory and prepends the bug number to compensate for the fact that they are all named y2log.
  • a categorized visual map of my open bugs, automatically updated with new data as I squash current bugs and new ones keep raining.
But not yet today. First we must be able to log in. Otherwise a saved query of yours will just redirect you to the iChain login page.
$ QUERY=Moje   # modify to have it work on your own account
$ curl >bugs.html$QUERY
$ w3m bugs.html

Meet bnc_curl, a handy wrapper around curl that takes care of the authentication.

$ ./bnc_curl --install username (not email): mvidner password (no echo):

This creates a file ~/.bnc_creds readable only by you containing the credentials. They are hex-escaped to protect them from gentlemen attackers. Now the retrieval will work.

$ ./bnc_curl >bugs.html$QUERY
$ w3m bugs.html

Download the script.


tom said...

Hi, we have a perl lib for bugzilla accesss available here:
It can query single bugs or bug lists of search results. Maybe it is useful for you, too.

sumit said...

Hey tom i didn't able to find ur perl lib . can u provide direct link.

Martin Vidner said...