From Fedora Project Wiki

Fedora Infrastructure Bugzilla scripts

Fedora Infrastructure has a number of scripts or apps that interact with bugzilla.redhat.com. We try and list them all out here and what methods they use so we can test new bugzilla versions as they come up or revisit things and make them faster/better.

FAS bugzilla sync

bugzilla.Bugzilla.updateperms()

  1. Remove user from fedorabugs group
  2. Add a user to the fedorabugs group

bugzilla.Bugzilla.getuser()

  1. Test that a user has a bugzilla account

PKGDB bugzilla sync

bugzilla.Bugzilla.getcomponentsdetails()

  1. Retrieve information about all the packages in a collection (Fedora, Fedora EPEL, Fedora Docker)
  2. Note: Non-bugzilla calls logic:
  3. Check for differences between what's i nthe pkgdb and what's in the
  4. components in bugzilla. [qacontact, initialowner, description,
  5. initialcclist]. Where a difference is found, set it on the package

bugzilla.Bugzilla.editcomponent()

  1. Save the data for packages we found above.

bugzilla.Bugzilla.addcomponent()

  1. Add new packages that didn't exist previously

bz-make-components (Ownership for docs, translations)

  1. **IMPORTANT** Everything else goes through python-bugzilla. This script
  2. makes xmlrpc calls on its own
  3. This could be ported to be more like the PKGDB bugzilla sync if needed

bugzilla.getProdCompDetails()

  1. To retrieve all components in the products [Fedora Documentation and Fedora Localization]

bugzilla.editComponent()

  1. To save the updated data for components that have had changes made

PKGDB

bugzilla.Bugzilla.query()

  1. Retrieve all bugs about a certain package in Fedora or Fedora EPEL where the bug is not closed.

bugzilla.Bugzilla.getbugsimple()

  1. Retrieve information about the bugs -- we use product, version, bug_id, url, bug_status, short_desc

bug.setassignee()

  1. Update the assignee of the bugs when the PoC of a package changes in pkgdb

Bodhi

bugzilla.Bugzilla.getbugid()

  1. Retrieve a bug to read its keywords, short_desc, product, parent, and title

bugzilla.Bugzilla._Bug.add_comment()}

  1. Add a comment to an existing bug

bugzilla.Bugzilla._Bug.close()

  1. Close a bug when an update is pushed to stable

bugzilla.Bugzilla._Bug.setstatus()

  1. Change the status of a bug when updates are submitted that address the bug

packages.fedoraproject.org

bugzilla.Bugzilla.query() bugzilla.Bugzilla.getbugs()

  1. Retrieve information for bugs on a package including statistics of how many
  2. recently closed bugs. Otherwise, similar to the pkgdb use

review-stats

  1. Caches review request bugs

bugzilla.Bugzilla.query() bugzilla.Bugzilla.getbugsimple()

easyfix.fedoraproject.org

  1. Finds tickets on selected projects that have been marked with an EasyFix
  2. style keyword for new contributors to work on

bugzilla.Bugzilla.query()

fedora-active-user

  1. Gathers information to see if a contributor has gone AWOL
  2. Uses bugzilla to tell how active the user has been in answering bugzilla
  3. bugs.

bugzilla.getuser() bugzilla.query() bugzilla.getbugs()

fedora-create-review and fedora-review

  1. Aids in reviewing new packages

bugzilla.query() bugzilla.getbugs() bugzilla.createbug() bugzilla.login()

the-new-hotness

  1. Files bugs about new versions of packages

bugzilla.login(), bugzilla._proxy.Bug.update(), bugzilla.attachfile(), bugzilla.query(), bugzilla.createbug(), bugzilla._proxy.bugzilla.changeStatus()


bugzilla2fedmsg

  1. Sends notification on the fedmsg message bus based on notification received from bugzilla's own bus

bugzilla.login(), bugzilla.getbug(), bug.get_history()