public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] pybugz - python command line interface to bugzilla
@ 2006-07-16 15:32 Alastair Tse
  2006-07-16 15:39 ` Mike Doty
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Alastair Tse @ 2006-07-16 15:32 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

Hi All,

As a little weekend project, I wrote a command line interface to
bugzilla in Python that is targetted to Gentoo's bugzilla (but also
generalisable to other bugzillas with a little code modification). It
can do the following:

* search bugzilla and output a table of bugs: bugz search <keyword>
* list bug details (incl comments and attachment): bugz get <bugid>
* get attachments: bugz attachment <attachid>
* post attachments: bugz attach <bugid> <filename>
* modify bug: bugz modify <bugid> -c "here is a new comment" --fixed

I know there's gentoo-bugger, which is great, but it's in perl and I
couldn't figure out how to modify the output to suit my needs. 

Here's the README attached if you're interested in how it might work for
you to become more efficient when dealing with Gentoo's Bugzilla. 

You can get it either via my portage overlay in:
http://overlays.gentoo.org/svn/dev/liquidx/app-admin/pybugz
or as a python distutils compat tarball in
http://media.liquidx.net/static/pybugz/pybugz-0.5.tar.gz

Hope maybe some people might find it useful.

Cheers,

Alastair

[-- Attachment #2: README --]
[-- Type: text/x-readme, Size: 3015 bytes --]

PyBugz - Python Bugzilla Interface
----------------------------------

Bugzilla has a very inefficient user interface, so I've written a
command line utility to interact with it. This is mainly done to help
me with closing bugs on Gentoo Bugzilla by grabbing patches, ebuilds
and so on.

Author
------
Alastair Tse <alastair@liquidx.net>. Copyright (c) 2006 under GPL-2.

Features
--------
* Searching bugzilla
* Listing details of a bug including comments and attachments
* Downloading/viewing attachments from bugzilla
* Posting comments, and making changes to an existing bug.
* Adding attachments to a bug.

Usage/Workflow
--------------

PyBugz comes with a command line interface called "bugz". It's
operation is similar in style to cvs/svn where a subcommand is
required for operation. 

To explain how it works, I will use a typical workflow for Gentoo
development. 

1) Searching bugzilla for bugs I can fix, I'll run the command:
---------------------------------------------------------------

$ bugz search "version bump" --assigned liquidx@gentoo.org

 * Using http://bugs.gentoo.org/ ..
 * Searching for "version bump" ordered by "number"
 101968 liquidx              net-im/msnlib version bump
 125468 liquidx              version bump for dev-libs/g-wrap-1.9.6
 130608 liquidx              app-dicts/stardict version bump: 2.4.7

2) Narrow down on bug #101968, I can execute:
---------------------------------------------

$ bugz get 101968

 * Using http://bugs.gentoo.org/ ..
 * Getting bug 130608 ..
Title       : app-dicts/stardict version bump: 2.4.7
Assignee    : liquidx@gentoo.org
Reported    : 2006-04-20 07:36 PST
Updated     : 2006-05-29 23:18:12 PST
Status      : NEW
URL         : http://stardict.sf.net
Severity    : enhancement
Reporter    : dushistov@mail.ru
Priority    : P2
Comments    : 3
Attachments : 1

[ATTACH] [87844] [stardict 2.4.7 ebuild]

[Comment #1] dushistov@----.ru : 2006-04-20 07:36 PST
...

3) Now this bug has an attachment submitted by the user, so I can
   easily pull that attachment in:
-----------------------------------------------------------------

$ bugz attachment 87844

 * Using http://bugs.gentoo.org/ ..
 * Getting attachment 87844
 * Saving attachment: "stardict-2.4.7.ebuild"

4) If the ebuild is suitable, we can commit it using our normal
   repoman tools, and close the bug.
---------------------------------------------------------------

$ bugz modify 130608 --fixed -c "Thanks for the ebuild. Committed to
  portage" 

or if we find that the bug is invalid, we can close it by using:

$ bugz modify 130608 --invalid -c "Not reproducable"

Other options
-------------

There is extensive help in `bugz --help` and `bugz <subcommand>
--help` for additional options. 

bugz.py can be easily adapted for other bugzillas by changing
BugzConfig to match the configuration of your target
bugzilla. However, I haven't spent much time on using it with other
bugzillas out there. If you do have changes that will make it easier,
please let me know.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] pybugz - python command line interface to bugzilla
  2006-07-16 15:32 [gentoo-dev] pybugz - python command line interface to bugzilla Alastair Tse
@ 2006-07-16 15:39 ` Mike Doty
  2006-07-16 18:33 ` Jakub Moc
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Mike Doty @ 2006-07-16 15:39 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alastair Tse wrote:
> Hi All,
> 
> As a little weekend project, I wrote a command line interface to
> bugzilla in Python that is targetted to Gentoo's bugzilla (but also
> generalisable to other bugzillas with a little code modification). It
> can do the following:
> 
> * search bugzilla and output a table of bugs: bugz search <keyword>
> * list bug details (incl comments and attachment): bugz get <bugid>
> * get attachments: bugz attachment <attachid>
> * post attachments: bugz attach <bugid> <filename>
> * modify bug: bugz modify <bugid> -c "here is a new comment" --fixed
> 
> I know there's gentoo-bugger, which is great, but it's in perl and I
> couldn't figure out how to modify the output to suit my needs. 
> 
> Here's the README attached if you're interested in how it might work for
> you to become more efficient when dealing with Gentoo's Bugzilla. 
> 
> You can get it either via my portage overlay in:
> http://overlays.gentoo.org/svn/dev/liquidx/app-admin/pybugz
> or as a python distutils compat tarball in
> http://media.liquidx.net/static/pybugz/pybugz-0.5.tar.gz
> 
> Hope maybe some people might find it useful.
> 
> Cheers,
> 
> Alastair
Very cool.  you might want to send it to the app-accessability group as
well; I'm sure blind people would love to have a CLI interface.

- --
=======================================================
Mike Doty                      kingtaco -at- gentoo.org
Gentoo/AMD64 Strategic Lead
Gentoo Developer Relations
Gentoo Recruitment Lead
Gentoo Infrastructure
GPG: 0094 7F06 913E 78D6 F1BB  06BA D0AD D125 A797 C7A7
=======================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (GNU/Linux)

iQCVAwUBRLpdtoBrouQZ9K4FAQIMdwQApY0NdHdQ23DGYopgrw9k9g+pETzvQi5A
J0/BcDcxsvM6SJOawm/JL6WETZ9hnPbjPC9yHTHKlKXhKGdbSjcLmc6De0yCDaVD
UwGbrbwy+iCtn04oUWgwUIAjYTcOgxhP+JSfp/+Az0Cs1L4vumx1mcMtlq1cpUem
bBEipB6iGTs=
=lFML
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] pybugz - python command line interface to bugzilla
  2006-07-16 15:32 [gentoo-dev] pybugz - python command line interface to bugzilla Alastair Tse
  2006-07-16 15:39 ` Mike Doty
@ 2006-07-16 18:33 ` Jakub Moc
  2006-07-16 18:41   ` Alastair Tse
  2006-07-16 19:27 ` [gentoo-dev] " Stefan Schweizer
  2006-07-17 10:28 ` [gentoo-dev] " Chris Bainbridge
  3 siblings, 1 reply; 7+ messages in thread
From: Jakub Moc @ 2006-07-16 18:33 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

Alastair Tse wrote:
> You can get it either via my portage overlay in:
> http://overlays.gentoo.org/svn/dev/liquidx/app-admin/pybugz
> or as a python distutils compat tarball in
> http://media.liquidx.net/static/pybugz/pybugz-0.5.tar.gz

Cool! Any reason why not commit it - at least package.masked? ;)

Thanks.

-- 
Best regards,

 Jakub Moc
 mailto:jakub@gentoo.org
 GPG signature:
 http://subkeys.pgp.net:11371/pks/lookup?op=get&search=0xCEBA3D9E
 Primary key fingerprint: D2D7 933C 9BA1 C95B 2C95  B30F 8717 D5FD CEBA 3D9E

 ... still no signature   ;)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] pybugz - python command line interface to bugzilla
  2006-07-16 18:33 ` Jakub Moc
@ 2006-07-16 18:41   ` Alastair Tse
  0 siblings, 0 replies; 7+ messages in thread
From: Alastair Tse @ 2006-07-16 18:41 UTC (permalink / raw
  To: gentoo-dev

On Sun, 2006-07-16 at 20:33 +0200, Jakub Moc wrote:
> Alastair Tse wrote:
> > You can get it either via my portage overlay in:
> > http://overlays.gentoo.org/svn/dev/liquidx/app-admin/pybugz
> > or as a python distutils compat tarball in
> > http://media.liquidx.net/static/pybugz/pybugz-0.5.tar.gz
> 
> Cool! Any reason why not commit it - at least package.masked? ;)

None really, except I don't like committing my own code to the tree. But
I do plan to commit it to the tree once I iron out any bugs there are
out of it.

Cheers,

Alastair


-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-dev]  Re: pybugz - python command line interface to bugzilla
  2006-07-16 15:32 [gentoo-dev] pybugz - python command line interface to bugzilla Alastair Tse
  2006-07-16 15:39 ` Mike Doty
  2006-07-16 18:33 ` Jakub Moc
@ 2006-07-16 19:27 ` Stefan Schweizer
  2006-07-17 10:28 ` [gentoo-dev] " Chris Bainbridge
  3 siblings, 0 replies; 7+ messages in thread
From: Stefan Schweizer @ 2006-07-16 19:27 UTC (permalink / raw
  To: gentoo-dev

Alastair Tse wrote:
> I know there's gentoo-bugger, which is great, but it's in perl and I
> couldn't figure out how to modify the output to suit my needs.
yeah gentoo-bugger was interactive, this one is better :)

I really like it, thank you.

> Here's the README attached if you're interested in how it might work for
> you to become more efficient when dealing with Gentoo's Bugzilla.

I am sure it will make us all more productive! 

> You can get it either via my portage overlay in:
> http://overlays.gentoo.org/svn/dev/liquidx/app-admin/pybugz
> or as a python distutils compat tarball in
> http://media.liquidx.net/static/pybugz/pybugz-0.5.tar.gz

I would love to see this in the portage tree. If you need an ebuild
maintainer just tell me :)

Best regards,
Stefan

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] pybugz - python command line interface to bugzilla
  2006-07-16 15:32 [gentoo-dev] pybugz - python command line interface to bugzilla Alastair Tse
                   ` (2 preceding siblings ...)
  2006-07-16 19:27 ` [gentoo-dev] " Stefan Schweizer
@ 2006-07-17 10:28 ` Chris Bainbridge
  2006-07-17 12:26   ` Alastair Tse
  3 siblings, 1 reply; 7+ messages in thread
From: Chris Bainbridge @ 2006-07-17 10:28 UTC (permalink / raw
  To: gentoo-dev

On 16/07/06, Alastair Tse <liquidx@gentoo.org> wrote:
> Hi All,
>
> As a little weekend project, I wrote a command line interface to
> bugzilla in Python that is targetted to Gentoo's bugzilla (but also
> generalisable to other bugzillas with a little code modification). It
> can do the following:

You might like to have a look at Redhat's bugzilla. There's a xml-rpc
interface (not sure if the patches are redhat specific or upstream)
that allows you to do these kind of things. There are also some
command line and gui tools that utilise the xml-rpc api.
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] pybugz - python command line interface to bugzilla
  2006-07-17 10:28 ` [gentoo-dev] " Chris Bainbridge
@ 2006-07-17 12:26   ` Alastair Tse
  0 siblings, 0 replies; 7+ messages in thread
From: Alastair Tse @ 2006-07-17 12:26 UTC (permalink / raw
  To: gentoo-dev

On Mon, 2006-07-17 at 11:28 +0100, Chris Bainbridge wrote:
> On 16/07/06, Alastair Tse <liquidx@gentoo.org> wrote:
> > Hi All,
> >
> > As a little weekend project, I wrote a command line interface to
> > bugzilla in Python that is targetted to Gentoo's bugzilla (but also
> > generalisable to other bugzillas with a little code modification). It
> > can do the following:
> 
> You might like to have a look at Redhat's bugzilla. There's a xml-rpc
> interface (not sure if the patches are redhat specific or upstream)
> that allows you to do these kind of things. There are also some
> command line and gui tools that utilise the xml-rpc api.

That must be their own extension to bugzilla because a quick grep of the
sources on bugzilla.org doesn't reveal anything about XML-RPC. They're
even using 2.18, which is a little older than what we're using on
bugs.g.o.

Cheers,

Alastair

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-07-17 12:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-16 15:32 [gentoo-dev] pybugz - python command line interface to bugzilla Alastair Tse
2006-07-16 15:39 ` Mike Doty
2006-07-16 18:33 ` Jakub Moc
2006-07-16 18:41   ` Alastair Tse
2006-07-16 19:27 ` [gentoo-dev] " Stefan Schweizer
2006-07-17 10:28 ` [gentoo-dev] " Chris Bainbridge
2006-07-17 12:26   ` Alastair Tse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox