Bugzilla helper module

class rebasehelper.helpers.bugzilla_helper.BugzillaHelper[source]

Class for working with Upstream Release Monitoring on bugzilla.

BUGZILLA_REST_API_URL = 'https://bugzilla.redhat.com/rest'
DIST_GIT_REPO_URL = 'https://src.fedoraproject.org/rpms'
UPSTREAM_RELEASE_MONITORING_USERNAME = 'upstream-release-monitoring'
classmethod clone_repository(component: str, bugzilla_id: str) → str[source]

Clones remote dist-git repository of a component.

  • component – Package to clone.
  • bugzilla_id – ID of the bugzilla.

Path to the cloned repository.

  • RebaseHelperError – If the directory, that the repository
  • is supposed to be cloned into, exists.
classmethod get_bugzilla_component(bugzilla_id: str) → str[source]

Gets a component of the bugzilla.


bugzilla_id – ID of the bugzilla.


Component of the bugzilla.

  • RebaseHelperError – If no such bugzilla exists or if the bugzilla
  • was not created by Upstream Release Monitoring.
classmethod get_version_from_comments(bugzilla_id: str) → Optional[str][source]

Gets version from bugzilla comments.

Parameters:bugzilla_id – ID of the bugzilla.
Returns:Version specified by Upstream Release Monitoring in comments or None, if no version could be found.
Raises:RebaseHelperError – If no such bugzilla exists.
classmethod prepare_rebase_repository(bugzilla_id: str) → Tuple[str, str][source]

Clones a repository based on Upstream Release Monitoring bugzilla.


bugzilla_id – ID of the bugzilla.


Path of the cloned repository and version to rebase to.

  • RebaseHelperError – If there was an error while obtaining
  • data from bugzilla or if there was a problem while cloning
  • the repository.