reviewboard.hostingsvcs.base.bug_tracker¶
An interface to a bug tracker.
Changed in version 7.1: Renamed this module from reviewboard.hostingsvcs.bugtracker.
- class BugInfo[source]¶
Bases:
TypedDictInformation about a bug.
New in version 7.1.
- description_text_format: NotRequired[Literal['html', 'markdown', 'plain']]¶
The text format of the description.
- __optional_keys__ = frozenset({})¶
- __required_keys__ = frozenset({'description', 'description_text_format', 'status', 'summary'})¶
- __total__ = True¶
- class BaseBugTracker[source]¶
Bases:
objectAn interface to a bug tracker.
Bug tracker subclasses are used to enable interaction with different bug trackers.
Changed in version 7.1: Moved and renamed from
reviewboard.hostingsvcs.bugtracker.BugTracker.- get_bug_info(repository: Repository, bug_id: str) BugInfo[source]¶
Return the information for the specified bug.
This should return a
BugInfodictionary.This is cached for 60 seconds to reduce the number of queries to the bug trackers and make things seem fast after the first infobox load, but is still a short enough time to give relatively fresh data.
- Parameters:
repository (
reviewboard.scmtools.models.Repository) – The repository object.bug_id (
str) – The ID of the bug to fetch.
- Returns:
Information about the bug.
- Return type:
- get_bug_info_uncached(repository: Repository, bug_id: str) BugInfo[source]¶
Return the information for the specified bug.
This should be implemented by subclasses.
- Parameters:
repository (
reviewboard.scmtools.models.Repository) – The repository object.bug_id (
str) – The ID of the bug to fetch.
- Returns:
Information about the bug.
- Return type:
- make_bug_cache_key(repository: Repository, bug_id: str) str | Sequence[str][source]¶
Return a key to use when caching fetched bug information.
Changed in version 7.1: Changed to return a list of strings for the cache key, which
djblets.cache.backend.cache_memoize()will use to create a safely escaped cache key.- Parameters:
repository (
reviewboard.scmtools.models.Repository) – The repository object.bug_id (
str) – The ID of the bug.
- Returns:
A key to use for the cache.
- Return type: