Skip to content

carljm/bztools

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This package defines remoteobjects models and some scripts for all the resources provided in Gervase Markham's Bugzilla REST API. Right now it's pretty damn slow. I hope that will change.

Installation

Currently, this package depends on a pre-release version of remoteobjects, so we'll have to do this the long way.

  1. Check out the code:

    git clone git://github.com/LegNeato/bztools.git
  2. (optional) Create your virtualenv using virtualenvwrapper:

    mkvirtualenv --no-site-packages bztools
  3. Install pip:

    easy_install pip
  4. Install the dependencies for bztools:

    pip install -r requirements.txt
  5. Run setup.py so the scripts are installed to your bin directory:

    python setup.py install

Now you'll have bzattach installed in the /bin directory of your virtual environment. To use the script, you'll have to activate this environment with workon bztools.

Usage

Example:

from bugzilla.agents import BMOAgent
from bugzilla.utils import get_credentials

# We can use "None" for both instead to not authenticate
username, password = get_credentials()

# Load our agent for BMO
bmo = BMOAgent(username, password)

# Set whatever REST API options we want
options = {
    'changed_after':    '2010-12-24',
    'changed_before':   '2010-12-26',
    'changed_field':    'status',
    'changed_field_to': 'RESOLVED',
    'product':          'Core,Firefox',
    'resolution':       'FIXED',
    'include_fields':   '_default,attachments',
}

# Get the bugs from the api
buglist = bmo.get_bug_list(options)

print "Found %s bugs" % (len(buglist))

for bug in buglist:
    print bug

About

Models and scripts to access the Bugzilla REST API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%