Mar 1, 2007

Bugzilla Automation - Logging In

I want to show you my tools to automate some tasks in Bugzilla, in particular in bugzilla.novell.com.

  • 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 https://bugzilla.novell.com/buglist.cgi?cmdtype=runnamed&namedcmd=$QUERY
$ w3m bugs.html

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

$ ./bnc_curl --install
Bugzilla.Novell.com username (not email): mvidner
Bugzilla.Novell.com 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 https://bugzilla.novell.com/buglist.cgi?cmdtype=runnamed&namedcmd=$QUERY
$ w3m bugs.html

Download the script.

3 comments:

tom said...

Hi, we have a perl lib for bugzilla accesss available here:
http://repos.opensuse.org/home:/digitaltomm/
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...

perl-SUSE-BugzillaClient.noarch.rpm